Two things:
1) You don't need to use the
map(s -> s.toString()).
parseDataSet is a
Set<String>, so
s is already a String. Note that you could also have used
map(Object::toString).
2) Never use
new Character(...) or any of the other primitive wrapper class constructors to wrap a primitive. If possible, don't wrap manually but use auto-boxing instead:
s -> s.charAt(0). If you really need explicit boxing, use the
valueOf method:
s -> Character.valueOf(s.charAt(0)). The reason is that
valueOf will use a cached instance for specific ranges; at least -128 to 127 (inclusive) for all numeric types, and at least
\u0000 to
\u007F for characters. FYI, that's the entire ASCII character set (see
http://www.asciitable.com/).