package ru.job4j;

/**
 * Created by ANTON on 01.06.2017.
 */
public class DirectoryOrganization {
}

@@ -16,46 +16,146 @@
 j;%0A%0A
-/**%0A * Created by ANTON 
+import java.util.*;%0A%0A/**%0A * Testing Task 3.4.1%0A * Create Directory oragnization%0A *%0A * @author Anton Vasilyuk%0A * @versi
 on 
-0
 1.0
-6.2017.
+%0A * @since 0.1
 %0A */
@@ -191,11 +191,1406 @@
 zation %7B
+%0A%0A    public List%3CString%3E checkOrganization(List%3CString%3E list) %7B%0A        Set%3CString%3E addString = new LinkedHashSet%3C%3E();%0A        int num = 0;%0A%0A        String%5B%5D tmp;%0A        String%5B%5D tmpOne;%0A        String checkWord = %22%22;%0A%0A        for(String s : list) %7B%0A            tmp = s.split(%22/%22);%0A            if (tmp.length %3E 1) %7B%0A                tmpOne = Arrays.copyOf(tmp, tmp.length - 1);%0A                for (int i = 0; i %3C tmpOne.length; i++) %7B%0A                    checkWord += tmpOne%5Bi%5D;%0A                    if (i != tmpOne.length - 1) %7B%0A                        checkWord += %22/%22;%0A                    %7D%0A                %7D%0A%0A                ListIterator%3CString%3E iter = list.listIterator();%0A%0A                while (iter.hasNext()) %7B%0A                    String p = iter.next();%0A                    if (p.equals(checkWord)) %7Bnum++;%7D%0A                %7D%0A%0A                if (num == 0) %7B%0A                    addString.add(checkWord);%0A                %7D%0A                checkWord = %22%22;%0A                num = 0;%0A            %7D%0A        %7D%0A        %0A        list.addAll(addString);%0A        return list;%0A    %7D%0A%0A    public List%3CString%3E sortOrganization(List%3CString%3E list) %7B%0A        Collections.sort(list, (o1, o2) -%3E o1.compareTo(o2));%0A%0A        return list;%0A    %7D%0A%0A    public List%3CString%3E reverseSortOrganization(List%3CString%3E list) %7B%0A        Collections.sort(list, (o1, o2) -%3E o2.compareTo(o1));%0A%0A        return list;%0A    %7D
 %0A%7D%0A

add file for chapter_003_3.4.3