List<User> list= new ArrayList<User>
List<User> relist = list.stream().collect(Collectors.collectingAndThen(Collectors.toCollection(
() -> new TreeSet<>(Comparator.comparing(user-> user.getCode() + "#" + user.getName() + "#" + user.getAge()))),
ArrayList::new));