Let's say I have a Dog
class.
Inside it I have a Map<String,String>
and one of the values is Breed
.
public class Dog {
String id;
...
public Map<String,String>
}
I want to get a Map
of List
s:
HashMap<String, List<Dog>> // breed to a List<Dog>
I'd prefer to use a Stream
rather than iterating it.
How can I do it?