If I have a List>, how can I turn that into a List that contains all the objects in the same iteration order
List>
List
You can use the flatCollect() pattern from Eclipse Collections.
flatCollect()
MutableList> list = Lists.mutable.empty(); MutableList flat = list.flatCollect(each -> each);
If you can't change list from List:
List> list = new ArrayList<>(); List flat = ListAdapter.adapt(list).flatCollect(each -> each);
Note: I am a contributor to Eclipse Collections.