@@ -0,0 +1,993 @@
+package ru.matevosyan;%0A%0Aimport java.util.Iterator;%0Aimport java.util.TreeSet;%0A%0A/**%0A * User class.%0A * Created on 28.04.2017.%0A * @author Matevosyan Vardan%0A * @version 1.0%0A */%0A%0Apublic class Department implements Comparable%3CDepartment%3E %7B%0A%0A    private final TreeSet%3CString%3E name;%0A%0A    /**%0A     * Department class constructor.%0A     * @param name User name.%0A     */%0A%0A    public Department(TreeSet%3CString%3E name) %7B%0A        this.name = name;%0A    %7D%0A%0A    /**%0A     * Override compareTo(Department department) method to compare department.%0A     * @param department is Department object.%0A     * @return int value.%0A     */%0A%0A    @Override%0A    public int compareTo(Department department) %7B%0A        Iterator iterator = department.getName().iterator();%0A        int check = -1;%0A%0A        while (iterator.hasNext()) %7B%0A            check = this.name.iterator().next().compareTo(String.valueOf(iterator.next()));%0A        %7D%0A        return check;%0A    %7D%0A%0A    public TreeSet%3CString%3E getName() %7B%0A        return name;%0A    %7D%0A%7D%0A

add Department.java