I have a piece of code:
table.stream().filter(row -> !hash.containsKey(row[keyColumnNumber])) .map(row -> row[keyColumnNumber]).map(hash::get) The last step: .map(hash::get) returns Collection<String[]>. and as a result I need to collect all of that to List.
.collect(Collectors.toList()) returns List> what is expected, but
.flatMap(Stream::of).collect(Collectors.toList()).collect(Collectors.toList()) returns the same result.
map(hash::get)returnsStream<String[]>orStream<Collection<String[]>>?List<String>orList<String[]>?