I want to use a Java Stream to run over a List of POJOs, such as the list List below, and transform it into a Map Map>
List
Map>
groupingBy does exactly what you want:
import static java.util.stream.Collectors.*; ... as.stream().collect(groupingBy((x) -> x.name, mapping((x) -> x.property, toSet())));