https://blog.csdn.net/u014231523/article/details/102535902
//1.提取出list对象中的一个属性
List<String> stIdList1 = stuList.stream().map(Person::getId).collect(Collectors.toList());
//2.提取出list对象中的一个属性并去重
List<String> stIdList2 = stuList.stream().map(Person::getId).distinct().collect(Collectors.toList());
//从一个Person对象的List集合,取出id和name组成一个map集合
Map<String, String> collect = list.stream().collect(Collectors.toMap(p -> p.getId(), p -> p.getName(),(oldValue, newValue)->newValue));
Map<String, Person> collect = list.stream().collect(Collectors.toMap(p -> p.getId(), p -> p));
//过滤
List<Person> filterList = persons.stream().filter(p -> p.getSex().equals(1)).collect(Collectors.toList());
//分组
Map<String, Long> collect = dogs.stream().collect(Collectors.groupingBy(i -> i.getName(), Collectors.counting()));
https://blog.csdn.net/zzqcsdn123/article/details/106871884
https://blog.csdn.net/gsls200808/article/details/86501905