无序
Map<String, List<GeneralVO>> groupMap = generalVOS.stream().collect(Collectors.groupingBy(GeneralVO::getTaskId));
有序
Map<String, List<GeneralVO>> groupMap2 = generalVOS.stream().collect(Collectors.groupingBy(GeneralVO::getTaskId,LinkedHashMap::new,Collectors.toList()));
标签:map,Collectors,stream,GeneralVO,list,value,groupingBy,key From: https://www.cnblogs.com/cgy-home/p/17585202.html