地址:https://www.cnblogs.com/tomoto/p/12915049.html
注意List 使用前需要做非空处理
1.以某个属性分组
>> map= userList.stream().collect(Collectors.groupingBy(User::getName));
2.获取集合中的某个属性转为集合
.collect(Collectors.toList());
3.根据集合中的某个属性进行升序重排
.collect(Collectors.toList());
4.根据集合中的某个属性进行降序重排
.collect(Collectors.toList());
5.集合中的属性去重
.toList());
6.根据集合中的某个属性过滤并获取第一个
.orElse(null);
7.根据集合中的属性转换为键值对Map
RateplanDO::getRateplanCode, rateplanDO -> rateplanDO));
8.获取集合中某个最大值的int数据
1);
9.提取集合中对象的某个属性转化List
.collect(Collectors.toList());