returnRemindList.stream().collect(Collectors.groupingBy(TopicRemindSettingBO::getRemindPhone, LinkedHashMap::new, Collectors.toCollection(ArrayList::new)));
returnRemindList 是已经排序好序的集合,groupingBy 分组后map是不保持有序, 加入如下2个参数可以保持原来的顺序输出
LinkedHashMap::new, Collectors.toCollection(ArrayList::new))

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-02-12
  • 2022-12-23
  • 2021-10-19
  • 2021-05-27
  • 2021-11-25
  • 2021-08-15
猜你喜欢
  • 2021-10-16
  • 2022-12-23
  • 2022-12-23
  • 2021-11-02
  • 2021-09-01
  • 2022-12-23
相关资源
相似解决方案