摘要: 方式一 1. distinct()不提供按照属性对对象列表进行去重的直接实现。它是基于hashCode()和equals()工作的。如果我们想要按照对象的属性,对对象列表进行去重,我们可以通过其它方法来实现 public static <T> Predicate<T> distinctByKey(F 阅读全文
posted @ 2022-02-17 09:22 一只蹒跚学编程的猴子 阅读(2602) 评论(0) 推荐(0)