Java8 list根据对象某个属性去重
2021-07-13 16:06
标签:ica super actor cti ati object lis 属性 util 1. 添加方法: 2. 使用: Java8 list根据对象某个属性去重 标签:ica super actor cti ati object lis 属性 util 原文地址:https://www.cnblogs.com/miaoying/p/9542002.htmlimport java.util.concurrent.ConcurrentHashMap;
import java.util.function.Function;
import java.util.function.Predicate;
import java.util.stream.Collectors;
private static
facultyRetList = facultyList.stream().filter(distinctByKey(Faculty::getId)).collect(Collectors.toList());
上一篇:Python3 字典