T:为实体对象,get方法为去重对象属性,返回list<T>
List<T> distinctClass = t.stream().
collect(Collectors.collectingAndThen(Collectors.toCollection(() ->
new TreeSet<>(Comparator.comparing(o -> o.getId() + ";" + o.getName()))), ArrayList::new));









