当前位置:网站首页>取两个集合的交集
取两个集合的交集
2022-07-07 18:13:00 【枫林残@】
List<Long> departmentUserNos = departmentVOList.stream().map(UserDepartmentVO::getUserNo).collect(toList());
List<Long> postUserNos = uo.stream().map(UserPostVO::getUserNo).collect(toList());
// 取出交集数据
List<Long> collect = departmentUserNos.stream().filter(postUserNos::contains).collect(toList());
//取差集
departmentUserNos.removeAll(collect )--->集合中剩余的为departmentUserNos独有的
同理:
postUserNos.removeAll(collect ) --->集合中剩余的为postUserNos独有的边栏推荐
- Leetcode force buckle (Sword finger offer 36-39) 36 Binary search tree and bidirectional linked list 37 Serialize binary tree 38 Arrangement of strings 39 Numbers that appear more than half of the tim
- mock. JS returns an array from the optional data in the object array
- Oracle 存儲過程之遍曆
- CUDA versions are inconsistent, and errors are reported when compiling apex
- Force buckle 1232 Dotted line
- How to implement safety practice in software development stage
- Openeuler prize catching activities, to participate in?
- MRS离线数据分析:通过Flink作业处理OBS数据
- BI的边界:BI不适合做什么?主数据、MarTech?该如何扩展?
- TS quick start - Generic
猜你喜欢

Sword finger offer II 013 Sum of two-dimensional submatrix

openEuler 资源利用率提升之道 01:概论

Cloud component development and upgrading

Some important knowledge of MySQL

Chapter 9 Yunji datacanvas was rated as 36 krypton "the hard core technology enterprise most concerned by investors"

Leetcode force buckle (Sword finger offer 36-39) 36 Binary search tree and bidirectional linked list 37 Serialize binary tree 38 Arrangement of strings 39 Numbers that appear more than half of the tim

MRS离线数据分析:通过Flink作业处理OBS数据

机器学习笔记 - 使用Streamlit探索对象检测数据集

Splicing and splitting of integer ints

九章云极DataCanvas公司获评36氪「最受投资人关注的硬核科技企业」
随机推荐
Force buckle 989 Integer addition in array form
微服务远程Debug,Nocalhost + Rainbond微服务开发第二弹
搞定带WebKitFormBoundary post登录
Force buckle 2315 Statistical asterisk
如何在软件研发阶段落地安全实践
毕业季|遗憾而又幸运的毕业季
Vulnhub's funfox2
Some arrangements about oneself
[sword finger offer] sword finger offer II 012 The sum of left and right subarrays is equal
线性基
浅尝不辄止系列之试试腾讯云的TUIRoom(晚上有约,未完待续...)
第二十章 使用工作队列管理器(三)
力扣 459. 重复的子字符串
SQL common optimization
有了ST7008, 蓝牙测试完全拿捏住了
使用 BR 恢复 Azure Blob Storage 上的备份数据
九度 1201 -二叉排序数遍历- 二叉排序树「建议收藏」
torch. nn. functional. Pad (input, pad, mode= 'constant', value=none) record
Sword finger offer II 013 Sum of two-dimensional submatrix
POJ 1742 Coins ( 单调队列解法 )「建议收藏」