java list 通过对象中某一参数去重,返回一个新list
List<ClassWhiteNameImportExcelListDto> list = list1.stream()
.collect(Collectors.collectingAndThen(Collectors.toCollection(() -> new TreeSet<>(Comparator.comparing(ClassWhiteNameImportExcelListDto::getMobile))), ArrayList::new));```
版权声明:本文为m0_46401243原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。