//交集 List<TFridCard> list = cardLiStIn.stream().filter(item ->msgModel.getPayload().stream().map(e -> e.getTagname()).collect(Collectors.toList()).contains(item.getUniqueCode())).collect(Collectors.toList()); //差集 List<TFridCard> list = cardLiStOut.stream().filter(item -> !msgModel.getPayload().stream().map(e -> e.getTagname()).collect(Collectors.toList()).contains(item.getUniqueCode())).collect(Collectors.toList());
原文地址:https://www.cnblogs.com/jackszc/p/11362236.html
时间: 2024-10-12 02:34:48