list = list.stream().collect(Collectors.collectingAndThen(Collectors.toCollection( () -> new TreeSet<>(Comparator.comparing(o -> o.getNewsId() + "#" + o.getUserId() + "#" + o.getType()))), ArrayList::new));