List<Person> personList = xxx;
集合过滤
personList.stream.filter(x->x.getAge()>20).collect(Collectors.toList());
对象取字段
List<String> names = personList.stream.map(Person::getName()).collect(Collectors.toList());
分组
groupingBy()
List转Map
Map<String,Person> personMap = personList.stream.toMap(x->getId(),x);