📅  最后修改于: 2022-03-11 14:52:23.165000             🧑  作者: Mango
Map> map = list.stream().
collect(Collectors.groupingBy(
Student::getName,
Collectors.mapping(e->getNum(e.getAddr()), Collectors.toSet())
));
System.out.println("Map : "+map);