Java常用lambda表达式
1.提取某一列
//从对象列表中提取一列(以name为例)
List nameList = studentList.stream().map(StudentInfo::getName).collect(Collectors.toList());
2.过滤
List<Apple> filterList = appleList.stream().filter(a -> a.getName().equals("香蕉")).collect(Collectors.toList());