I have the following object:
List persons
And I want to create the following structure
List> based on the family name.
I am able to group them in a Map by using groupingBy(p -> p.getFamilyName()). But I would like not to have a map, but a List of Lists.
You can do it in two steps by using the method values() of the map. But I would like to know if you can do it with a collector.