stream根据map中的一个字段排序

org = org.stream().sorted(Comparator.comparing(SynchronousDataService::sort2)).collect(Collectors.toList());// 排序

private static String sort2(Map<String, Object> a) {
  return (String) a.get("uri");
 }

posted @ 2019-08-20 20:01  四块五  阅读(4181)  评论(1)    收藏  举报