.collect(Collectors.groupingBy(...))
maybe actually learn to program sometimes, then you will figure out what it does.