当前位置:网站首页>取两个集合的交集
取两个集合的交集
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力扣(剑指offer 36-39)36. 二叉搜索树与双向链表37. 序列化二叉树38. 字符串的排列39. 数组中出现次数超过一半的数字
- Oracle 存儲過程之遍曆
- 使用高斯Redis实现二级索引
- ASP.NET学习& asp‘s one word
- Sword finger offer II 013 Sum of two-dimensional submatrix
- Opencv learning notes high dynamic range (HDR) imaging
- 有用的win11小技巧
- ASP. Net learning & ASP's one word
- [résolution] le paquet « xxxx» n'est pas dans goroot
- vulnhub之school 1
猜你喜欢

Implement secondary index with Gaussian redis

School 1 of vulnhub

LeetCode力扣(剑指offer 36-39)36. 二叉搜索树与双向链表37. 序列化二叉树38. 字符串的排列39. 数组中出现次数超过一半的数字

LeetCode_ 7_ five

Opencv学习笔记 高动态范围 (HDR) 成像

微服务远程Debug,Nocalhost + Rainbond微服务开发第二弹

一. 基础概念

php 获取图片信息的方法

How to cooperate among multiple threads

CSDN syntax description
随机推荐
Micro service remote debug, nocalhost + rainbow micro service development second bullet
Compiler optimization (4): inductive variables
多个线程之间如何协同
深度学习模型压缩与加速技术(七):混合方式
Force buckle 1790 Can two strings be equal by performing string exchange only once
Meta Force原力元宇宙系统开发佛萨奇模式
Chapter 9 Yunji datacanvas was rated as 36 krypton "the hard core technology enterprise most concerned by investors"
841. String hash
vulnhub之Funfox2
With st7008, the Bluetooth test is completely grasped
力扣 2315.统计星号
解决/bin/sh进去的容器运行可执行文件报not found的问题
ASP.NET学习& asp‘s one word
Force buckle 459 Duplicate substring
Oracle 存储过程之遍历
力扣599. 两个列表的最小索引总和
equals 方法
[résolution] le paquet « xxxx» n'est pas dans goroot
c语言如何判定是32位系统还是64位系统
Cuda版本不一致,编译apex报错