java stream filter过滤掉null值

代码

List<Long> filterList = testList.stream().filter(temp -> temp != null && temp.xxx != null).
                collect(Collectors.toList());

猜你喜欢

转载自blog.csdn.net/qq_34626094/article/details/123395133
今日推荐