List<CatTest> catList = Lists.newArrayList();catList.stream() .collect( Collectors.collectingAndThen( Collectors.toCollection(() -> new TreeSet<>(Comparator.comparing(cat -> cat.getCarHobby() + cat.getCatName()))), ArrayList::new ) );