2021年12月4日

java8中lambda的用法(map转list,list转map等等

摘要: 注意List 使用前需要做非空处理 1.以某个属性分组 Map<String,List<User>> map= userList.stream().collect(Collectors.groupingBy(User::getName)); 2.获取集合中的某个属性转为集合 pictureList. 阅读全文

posted @ 2021-12-04 12:44 lidongsheng 阅读(1347) 评论(0) 推荐(0) 编辑

导航