Back
You can apply flatMap to flatten the native lists (after converting them to Streams) within a single Stream, and then get the result into a list:
List<List<Object>> list = ...List<Object> flat = list.stream() .flatMap(List::stream) .collect(Collectors.toList());
List<List<Object>> list = ...
List<Object> flat =
list.stream()
.flatMap(List::stream)
.collect(Collectors.toList());
31k questions
32.8k answers
501 comments
693 users