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());
1.2k questions
2.7k answers
501 comments
693 users