当前位置:网站首页>关于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
边栏推荐
- 1256: bouquet for algenon
- elmo(BiLSTM-CRF+elmo)(Conll-2003 命名实体识别NER)
- Force deduction brush question 101 Symmetric binary tree
- 服务器中挖矿病毒了,屮
- Oracle alarm log alert Chinese trace and trace files
- [VMware] address of VMware Tools
- Postman reference summary
- Multithreading
- SPC简介
- MySQL [acid + isolation level + redo log + undo log]
猜你喜欢
[VMware] address of VMware Tools
UML统一建模语言
SQL learning window function
Quartus prime hardware experimental development (de2-115 board) experiment 1 CPU instruction calculator design
elmo(BiLSTM-CRF+elmo)(Conll-2003 命名实体识别NER)
Un modèle universel pour la construction d'un modèle d'apprentissage scikit
Elmo (bilstm-crf + Elmo) (conll-2003 named entity recognition NER)
groutine
Basic SQL query and learning
Crontab timing task output generates a large number of mail and runs out of file system inode problem processing
随机推荐
收藏博客贴
Express ② (routage)
3300万IOPS、39微秒延迟、碳足迹认证,谁在认真搞事情?
The latest development of fed digital currency
初探 Lambda Powertools TypeScript
容差分析相关的计算公式
第一章 电商秒杀商品回顾
Express middleware ③ (custom Middleware)
Elmo (bilstm-crf + Elmo) (conll-2003 named entity recognition NER)
Strange bug of cnpm
AttributeError: ‘dict‘ object has no attribute ‘iteritems‘
Multithreading
SQL learning window function
Expression「Func「TSource, object」」 转Expression「Func「TSource, object」」[]
美联储数字货币最新进展
[code analysis (1)] communication efficient learning of deep networks from decentralized data
读了一篇博客,重新理解闭包整理一下
leetcode--380.O(1) 时间插入、删除和获取随机元素
Go语言 RPC通讯
Atcoder beginer contest 248c dice sum (generating function)