@@ -0,0 +1,1006 @@
+package ru.job4j;%0A%0Aimport java.util.*;%0A%0A/**.%0A* Chapter_003%0A* Task 3.1.2%0A* Check time for other collection%0A*%0A* @author Anton Vasilyuk%0A* @version 1.0%0A* @since 0.1%0A*/%0A%0Apublic class CheckTime %7B%0A%0A%09/**.%0A%09* Method for check time for operation add%0A%09* @param collection%0A%09* @param line is added word%0A%09* @param amount is number element%0A%09* @return time%0A%09*/%0A%09public long add(Collection%3CString%3E collection, String line, int amount) %7B%0A%0A%09%09String word = %22a%22;%0A%09%09long firstTime = System.currentTimeMillis();%0A%0A%09%09for (int i = 0; i %3C amount; i++) %7B%0A%09%09%09word += line;%0A%09%09%09collection.add(word);%0A%09%09%7D%0A%09%09long secondTime = System.currentTimeMillis();%0A%09%09return secondTime - firstTime;%0A%09%7D%0A%09public long delete(Collection%3CString%3E collection, int amount) %7B%0A%0A%09%09Iterator%3CString%3E iter = collection.iterator();%0A%09%09int i = 0;%0A%09%09long firstTime = System.currentTimeMillis();%0A%0A%09%09while (iter.hasNext() && i %3C amount) %7B%0A%09%09%09iter.next();%0A%09%09%09iter.remove();%0A%09%09%09i++;%0A%09%09%7D%0A%0A%09%09long secondTime = System.currentTimeMillis();%0A%09%09return secondTime - firstTime;%0A%09%7D%0A%7D

add file for chapter_003_3.1.3