JAVA List去重

purList = purList.stream().collect(Collectors.collectingAndThen(Collectors.toCollection(() ->
                        new TreeSet<>(Comparator.comparing(priceVO :: getLineId))), ArrayList::new))

 

posted @ 2021-05-24 16:01  哎丫丫呀喂  阅读(28)  评论(0编辑  收藏  举报