获取集合中指定字段集合
List<String> names= list.stream().map(Book -> Book.getName()).collect(Collectors.toList());
查询集合中匹配的多个对象
List<Student> students= list.stream().filter(s -> "小明".equals(t.getName())).collect(Collectors.toList());
查询集合中匹配的第一个对象
Student student= list.stream().filter(t -> "小明".equals(t.getName())).findFirst().orElse(null);
数组去重
List<String> newList = list.stream().distinct().collect(Collectors.toList());
排序
Collections.sort(list);