//取出不同的集合
List<ObituaryInfoVO> userList = obituaryInfoVOS.stream()
.filter(obituaryInfoVO -> !digitalAssetVOList.stream()
.map(digitalAssetVO -> digitalAssetVO.getObituaryId())
.collect(Collectors.toList())
.contains(obituaryInfoVO.getId()))
.collect(Collectors.toList());
//取出相同的集合
List<TeamArea> userList = areaList.stream().collect(Collectors.collectingAndThen(
// Collectors.toCollection(() -> new TreeSet<>(Comparator.comparing(TeamArea::getSecondRegion))),
// ArrayList::new));
java 取出俩个list对象中不同值
于 2023-03-07 16:18:49 首次发布