list对象根据某个属性去重 ListdistinctList = list.stream() .collect(Collectors.collectingAndThen(Collectors.toCollection(() -> new TreeSet<>(Comparator.comparing(ReadCompMarkedDatasetText::getText))), ArrayList::new));

list对象根据某个属性去重 ListdistinctList = list.stream() .collect(Collectors.collectingAndThen(Collectors.toCollection(() -> new TreeSet<>(Comparator.comparing(ReadCompMarkedDatasetText::getText))), ArrayList::new));