取成员属性list
List<String> configList = codeEntityList.stream().map(t -> t.getName()).distinct().collect(Collectors.toList());
对象的过滤
list.stream().filter(body-> body.getId().equals(entity1.getId())).findAny().get();
//跟据某个属性分组
Map<String, List<PersonData>> collect = list.stream().collect(Collectors.groupingBy(PersonData::getType));
//根据某个属性分组,汇总某个属性
Map<String, Integer> collect2 = list.stream().collect(Collectors.groupingBy(PersonData::getType,Collectors.summingInt(PersonData::getAge)));
//根据某个属性添加条件过滤数据,
list = list.stream().filter(u -> !u.getType().equals("访客")).collect(Collectors.toList());
//判断一组对象里面有没有属性值是某个值
boolean add = list.stream().anyMatch(m -> "王五".equals(m.getName()));
//取出一组对象的某个属性组成一个新集合
List<String> names=list.stream().map(PersonData::getName).collect(Collectors.toList());