JAVA List去重

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

 

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