lambda表达式筛选list中符合条件的list

List<CourseLessonExt> Taglist=list.stream().filter(CourseLessonExt->(CourseLessonExt.getType()==3))
.collect(Collectors.toList());

list为要筛选的list对象;

CourseLessonExt是list对象中的model类重命名;

CourseLessonExt.getType()==3是筛选条件;

 

posted @ 2020-10-29 17:09  蹉~跎  阅读(3860)  评论(0)    收藏  举报