//添加静态方法
private static Integer sortMap(Map<String,Object> map){
return Integer.valueOf(map.get("evtId").toString());
}

//比较方法中添加类名(SendServiceImpl)::静态方法(sortMap)即可
List<Map<String,Object>> newMapList = mapList.stream().sorted(Comparator.comparing(SendServiceImpl::sortMap)).collect(Collectors.toList());;
 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-01-17
  • 2021-07-21
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-20
猜你喜欢
  • 2022-12-23
  • 2021-11-30
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案