当前位置:网站首页>流式编程使用场景
流式编程使用场景
2022-08-03 11:59:00 【浩展】
把一个List中按某个规则(例如某一值等于0)拿出来放到另一个List集合中
List<CategoryEntity> entities = baseMapper.selectList(null);
//拿出一级分类
List<CategoryEntity> level1Menus = entities.stream().filter(categoryEntity -> {
return categoryEntity.getParentCid() == 0;
}).collect(Collectors.toList());
边栏推荐
猜你喜欢

肝完Alibaba这份面试通关宝典,我成功拿下今年第15个Offer

Fastjson反序列化

PC client automation testing practice based on Sikuli GUI image recognition framework

笔试题:金额拆分

Matlab学习13-图像处理之可视化GUI程序

QGIS绘制演习区域示意图

面试官:SOA 和微服务的区别?这回终于搞清楚了!

Five super handy phone open-source automation tools, which is suitable for you?
【一起学Rust 基础篇】Rust基础——变量和数据类型

技术总监需要会些什么?也太难了!
随机推荐
bash case用法
mysql advanced (twenty-four) method summary of defense against SQL injection
第5章 实现首页Tab数据展示
html+css+php+mysql实现注册+登录+修改密码(附完整代码)
优维低代码:Provider 构件
数据库系统原理与应用教程(076)—— MySQL 练习题:操作题 160-167(二十):综合练习
Traceback (most recent call last): File
什么是Weex
ROS中编译通过但是遇到可执行文件找不到的问题
进程内存
dataset数据集有哪些_数据集类型
LeetCode——622.设计循环队列
字节最爱问的智力题,你会几道?
【一起学Rust】Rust包管理工具Cargo初步了解
bash while loop and until loop
LeetCode 899 有序队列[字典序] HERODING的LeetCode之路
LeetCode-142. 环形链表 II
谷歌研究员被群嘲:研究员爆料AI有意识,被勒令休假
QGIS绘制演习区域示意图
第3章 搭建短视频App基础架构