当前位置:网站首页>关于stream流,浅记一下------
关于stream流,浅记一下------
2022-04-23 14:00:00 【白云碎里一蓑舟】
- 逗号拼接list中的某一对象字段
millAndKilns.stream().map(MillAndKiln::getName).collect(Collectors.joining(","));
- 将对象集合中的某一个字段提取成一个新的集合
List<Long> appUnitIds = appUnitVOPage.getRecords().stream().map(AppUnitListVO::getId).collect(Collectors.toList());
- 根据id分组成key-value形式
Map<Long, List<AppField>> appFieldMap = fields.stream().collect(Collectors.groupingBy(AppField::getAppId));
- 判断集合中莫格对象字段是否包含指定值
versions.stream().map(AppVersion::getIsShelf).collect(Collectors.toList()).contains(PlatformConstant.IsShelf.ON_THE_SHELF)
- 集合根据莫格字段排序
versions.stream().sorted(Comparator.comparing(AppVersion::getUpdateTime).reversed()).collect(Collectors.toList())
版权声明
本文为[白云碎里一蓑舟]所创,转载请带上原文链接,感谢
https://blog.csdn.net/m0_49513507/article/details/123916107
边栏推荐
- 2022年江西最新建筑八大员(质量员)模拟考试题库及答案解析
- 大专的我,闭关苦学 56 天,含泪拿下阿里 offer,五轮面试,六个小时灵魂拷问
- [code analysis (4)] communication efficient learning of deep networks from decentralized data
- MySQL [acid + isolation level + redo log + undo log]
- Force deduction brush question 101 Symmetric binary tree
- Decimal 格式化小数位/DateTime 转换处理
- 1256:献给阿尔吉侬的花束
- Introduction to spark basic operation
- Decentralized Collaborative Learning Framework for Next POI Recommendation
- 神经元与神经网络
猜你喜欢

Solution of discarding evaluate function in surprise Library

JS brain burning interview question reward

Detailed explanation of redis (Basic + data type + transaction + persistence + publish and subscribe + master-slave replication + sentinel + cache penetration, breakdown and avalanche)

Building MySQL environment under Ubuntu & getting to know SQL

神经元与神经网络

低频量化之明日涨停预测

Nacos+AspnetCore+Ocelot实战编码

大专的我,闭关苦学 56 天,含泪拿下阿里 offer,五轮面试,六个小时灵魂拷问

groutine

1256:献给阿尔吉侬的花束
随机推荐
Postman reference summary
Un modèle universel pour la construction d'un modèle d'apprentissage scikit
Force deduction brush question 101 Symmetric binary tree
scikit-learn构建模型的万能模板
Reading notes: fedgnn: Federated graph neural network for privacy preserving recommendation
Kettle--控件解析
Oracle告警日志alert.log和跟踪trace文件中文乱码显示
Wechat applet
自动化的艺术
elmo(BiLSTM-CRF+elmo)(Conll-2003 命名实体识别NER)
leetcode--380.O(1) 时间插入、删除和获取随机元素
Choreographer全解析
Android interview theme collection
Oracle alarm log alert Chinese trace and trace files
Introduction to spark basic operation
Program compilation and debugging learning record
freeCodeCamp----arithmetic_ Arranger exercise
Express ② (routage)
3300万IOPS、39微秒延迟、碳足迹认证,谁在认真搞事情?
The art of automation