If I have a List<List<Foo>> I can use flat map to flatten the list.
But I have by MyClass which has a List<Foo> and the Foo class has list of bars List<Bar> then I have to do something like this :
myClass.getFoos().stream().map(Foo::getBars).forEach({
bar -> // some code
});
Is it possible to use flat map in this scenario so I can get list of bars from MyClass in one shot.