java8对list的根据参数过滤重复对象 Published on May 29, 2020 in Java with 1 comment 记录一下 ```java listUser.stream().collect( collectingAndThen(Collectors.toCollection(() -> new TreeSet<>(Comparator.comparing(User::getId))), ArrayList::new)); ``` 返回值是个ArrayList集合 本文由 admin 创作,采用 知识共享署名4.0 国际许可协议进行许可。本站文章除注明转载/出处外,均为本站原创或翻译,转载前请务必署名。
:pen:爬爬爬