package ru.job4j.sorting;

import java.util.List;
import java.util.Set;
import java.util.TreeSet;

/**.
 * Class SortUser for User sorting.
 * @author Mikhail Vlasov
 * @since 9.25.2017
 * @version 1
 */
public class SortUser {
    /**.
     * Converts List<User> to TreeSet<User>.
     * @param userList of users.
     * @return Set<User> of users.
     */
    public Set<User> sort(List<User> userList) {
        Set<User> userSet = new TreeSet<>();
        userSet.addAll(userList);
        return userSet;
    }
}

@@ -412,101 +412,38 @@
     
-Set%3CUser%3E userSet = new TreeSet%3C%3E();%0A        userSet.addAll(userList);%0A        return userSet
+return new TreeSet%3C%3E(userList)
 ;%0A  

Task 10034