Map<String, List<WellInBlockAbAmend>> map= UserList.stream().filter(a -> a.getName() != null).collect(Collectors.groupingBy(User::getName));
Java中Stream对数据分组
于 2022-06-17 16:49:19 首次发布
Map<String, List<WellInBlockAbAmend>> map= UserList.stream().filter(a -> a.getName() != null).collect(Collectors.groupingBy(User::getName));