直接给解决方案:

Map<Integer, List<A>> groupMap = schedule_extends.stream()
                .collect(Collectors.groupingBy(A::getID,LinkedHashMap::new,Collectors.toList()));

主要是

Collectors.groupingBy(A::getID,LinkedHashMap::new,Collectors.toList())

 

相关文章:

  • 2021-06-24
  • 2021-10-19
  • 2021-07-08
  • 2022-12-23
  • 2022-12-23
  • 2021-06-23
  • 2021-10-11
  • 2021-11-23
猜你喜欢
  • 2022-12-23
  • 2022-01-18
  • 2022-12-23
  • 2021-07-21
  • 2021-09-07
  • 2021-12-11
  • 2021-10-01
相关资源
相似解决方案