Sorry for the weird title. Basically what I'm trying to do is as follows. I have a class called Details, let's say.
class Detail{
String title;
Project project;
}
Using Streams, as you can see I'm able to group Detail by their titles. However I want to group Projects inside of those Detail by title, not Detail.
List<Detail> results; // not empty
Map<String, List<Detail>> res = results
.stream()
.collect(groupingBy(Detail::getTitle));
Thanks, beforehand