jdk18常用方法


jdk1.8获取集合中某个属性值相同的集合:

List repeatMobile = requestList.stream().collect(Collectors.groupingBy(
CustomerOrgEmployeeRequest::getMobile, Collectors.counting())).entrySet().stream().filter(entry -> entry.getValue() >1)
.map(Map.Entry::getKey).collect(Collectors.toList());