当前位置:网站首页>关于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
边栏推荐
- 读了一篇博客,重新理解闭包整理一下
- cnpm的诡异bug
- Get the attribute value difference between two different objects with reflection and annotation
- Multithreading
- MySQL [acid + isolation level + redo log + undo log]
- Dynamic subset division problem
- How does redis solve the problems of cache avalanche, cache breakdown and cache penetration
- Express②(路由)
- 趣谈网络协议
- Small case of web login (including verification code login)
猜你喜欢
蓝绿发布、滚动发布、灰度发布,有什么区别?
Quartus prime hardware experimental development (de2-115 board) experiment II function adjustable comprehensive timer design
Record a strange bug: component copy after cache component jump
cnpm的诡异bug
UML统一建模语言
UML Unified Modeling Language
Express②(路由)
Technologie zéro copie
专题测试05·二重积分【李艳芳全程班】
零拷貝技術
随机推荐
SQL learning | set operation
Business case | how to promote the activity of sports and health app users? It is enough to do these points well
Reading notes: fedgnn: Federated graph neural network for privacy preserving recommendation
Un modèle universel pour la construction d'un modèle d'apprentissage scikit
解决方案架构师的小锦囊 - 架构图的 5 种类型
Android 面试主题集合整理
[code analysis (2)] communication efficient learning of deep networks from decentralized data
蓝绿发布、滚动发布、灰度发布,有什么区别?
AttributeError: ‘dict‘ object has no attribute ‘iteritems‘
freeCodeCamp----time_ Calculator exercise
Choreographer全解析
Oracle告警日志alert.log和跟踪trace文件中文乱码显示
Scientists say Australian plan to cull up to 10,000 wild horses doesn’t go far enough
How does redis solve the problems of cache avalanche, cache breakdown and cache penetration
json反序列化匿名数组/对象
1256:献给阿尔吉侬的花束
Decentralized Collaborative Learning Framework for Next POI Recommendation
elmo(BiLSTM-CRF+elmo)(Conll-2003 命名实体识别NER)
MySQL index [data structure + index creation principle]
Dynamic subset division problem