{"action":"created","comment":{"url":"https://api.github.com/repos/technicaltaskjava/JavaCoreHomework/pulls/comments/58662067","id":58662067,"diff_hunk":"@@ -0,0 +1,316 @@\n+package epam.com.task2;\n+\n+import java.util.*;\n+\n+/**\n+ * Created by Oleg on 05.04.2016.\n+ */\n+public class MyArrayListImpl<T> implements List<T>, java.io.Serializable {\n+\n+    private transient Object[] elements;\n+    private int size;\n+    private int index = 0;\n+\n+    public MyArrayListImpl() {\n+        this(10);\n+    }\n+\n+    public MyArrayListImpl(int size) {\n+        this.elements = new Object[size];\n+        this.size = size;\n+    }\n+\n+\n+    public int size() {\n+        return size;\n+    }\n+\n+    public boolean isEmpty() {\n+        return size == 0;\n+    }\n+\n+    public boolean contains(Object o) {\n+        for (Object t :\n+                elements) {\n+            if (t.equals(o)) {\n+                return true;\n+            }\n+        }\n+        return false;\n+    }\n+\n+    public Iterator<T> iterator() {\n+\n+        return new Iterator<T>() {\n+            int iter = 0;\n+\n+            public boolean hasNext() {\n+                if (size > iter + 1) {\n+                    return elements[iter + 1] != null;\n+                }\n+                return false;\n+            }\n+\n+            public T next() {\n+                if (hasNext()) {\n+                    iter++;\n+                    return (T) elements[iter - 1];\n+                }\n+                return null;\n+            }\n+        };\n+    }\n+\n+    public Object[] toArray() {\n+        return elements;\n+    }\n+\n+    public <T1> T1[] toArray(T1[] a) {\n+        return (T1[]) elements;\n+    }\n+\n+    public boolean add(T t) {\n+        if (t == null) {\n+            return false;\n+        }\n+        if (index == elements.length) {\n+            Object[] temp = new Object[elements.length + 1];\n+            temp = elements.clone();\n+            elements = temp;\n+        }\n+        elements[elements.length - 1] = t;\n+        size = elements.length;\n+        return true;\n+    }\n+\n+    public boolean remove(Object o) {\n+        for (int index = 0; index < size; index++)\n+            if (o.equals(elements[index])) {\n+                if (size - index - 1 > 0) {\n+                    System.arraycopy(elements, index + 1, elements, index, size - index - 1);\n+                    size = elements.length;\n+                    return true;\n+                }\n+            }\n+        return false;\n+    }\n+\n+    public boolean containsAll(Collection<?> c) {\n+        Iterator<?> e = c.iterator();\n+        while (e.hasNext()) {\n+            if (!contains(e.next())) {\n+                return false;\n+            }\n+        }\n+        return true;\n+    }\n+\n+    public boolean addAll(Collection<? extends T> c) {\n+\n+        Object[] a = c.toArray();\n+        int newSize = a.length;\n+        ensureCapacity(size + newSize);\n+        System.arraycopy(a, 0, elements, size, newSize);\n+        size += newSize;\n+        return newSize != 0;\n+    }\n+\n+    public boolean addAll(int index, Collection<? extends T> c) {\n+        if (index > size || index < 0) {\n+            throw new IndexOutOfBoundsException();\n+        }\n+        Object[] a = c.toArray();\n+        int newSize = a.length;\n+        ensureCapacity(size + newSize);\n+        if (size - index - 1 > 0) {\n+            System.arraycopy(elements, index + 1, elements, index, size - index - 1);\n+        }\n+        System.arraycopy(a, 0, elements, index, newSize);\n+        size += newSize;\n+        return newSize != 0;\n+    }\n+\n+    public boolean removeAll(Collection<?> c) {\n+\n+        int deleted = 0;\n+        Iterator<?> e = c.iterator();\n+        while (e.hasNext()) {\n+            if (contains(e.next())) {\n+                remove(e.next());\n+                size--;\n+                deleted++;\n+            }\n+        }\n+        return deleted != 0;\n+    }\n+\n+    public boolean retainAll(Collection<?> c) {\n+        int deleted = 0;\n+        Iterator<?> e = c.iterator();\n+        while (e.hasNext()) {\n+            if (!contains(e.next())) {\n+                remove(e.next());\n+                size--;\n+                deleted++;\n+            }\n+        }\n+        return deleted == 0;\n+    }\n+\n+    public void clear() {","path":"Oleg_Gondar/Module 6 - Collections/src/main/java/epam/com/task2/MyArrayListImpl.java","position":160,"original_position":160,"commit_id":"bb51a94a0df1f47aa93e182c4e7ea266a54da490","original_commit_id":"bb51a94a0df1f47aa93e182c4e7ea266a54da490","user":{"login":"technicaltaskjava","id":17650564,"avatar_url":"https://avatars.githubusercontent.com/u/17650564?v=3","gravatar_id":"","url":"https://api.github.com/users/technicaltaskjava","html_url":"https://github.com/technicaltaskjava","followers_url":"https://api.github.com/users/technicaltaskjava/followers","following_url":"https://api.github.com/users/technicaltaskjava/following{/other_user}","gists_url":"https://api.github.com/users/technicaltaskjava/gists{/gist_id}","starred_url":"https://api.github.com/users/technicaltaskjava/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/technicaltaskjava/subscriptions","organizations_url":"https://api.github.com/users/technicaltaskjava/orgs","repos_url":"https://api.github.com/users/technicaltaskjava/repos","events_url":"https://api.github.com/users/technicaltaskjava/events{/privacy}","received_events_url":"https://api.github.com/users/technicaltaskjava/received_events","type":"User","site_admin":false},"body":"![MAJOR](https://raw.githubusercontent.com/SonarCommunity/sonar-github/master/images/severity-major.png) Add the \"@Override\" annotation above this method signature [![rule](https://raw.githubusercontent.com/SonarCommunity/sonar-github/master/images/rule.png)](http://localhost:9000/coding_rules#rule_key=squid%3AS1161)\n","created_at":"2016-04-06T07:29:41Z","updated_at":"2016-04-06T07:29:41Z","html_url":"https://github.com/technicaltaskjava/JavaCoreHomework/pull/76#discussion_r58662067","pull_request_url":"https://api.github.com/repos/technicaltaskjava/JavaCoreHomework/pulls/76","_links":{"self":{"href":"https://api.github.com/repos/technicaltaskjava/JavaCoreHomework/pulls/comments/58662067"},"html":{"href":"https://github.com/technicaltaskjava/JavaCoreHomework/pull/76#discussion_r58662067"},"pull_request":{"href":"https://api.github.com/repos/technicaltaskjava/JavaCoreHomework/pulls/76"}}},"pull_request":{"url":"https://api.github.com/repos/technicaltaskjava/JavaCoreHomework/pulls/76","id":65384470,"html_url":"https://github.com/technicaltaskjava/JavaCoreHomework/pull/76","diff_url":"https://github.com/technicaltaskjava/JavaCoreHomework/pull/76.diff","patch_url":"https://github.com/technicaltaskjava/JavaCoreHomework/pull/76.patch","issue_url":"https://api.github.com/repos/technicaltaskjava/JavaCoreHomework/issues/76","number":76,"state":"open","locked":false,"title":"Oleg Gondar Homework Module 6 - Collections","user":{"login":"GondarOleg","id":17525996,"avatar_url":"https://avatars.githubusercontent.com/u/17525996?v=3","gravatar_id":"","url":"https://api.github.com/users/GondarOleg","html_url":"https://github.com/GondarOleg","followers_url":"https://api.github.com/users/GondarOleg/followers","following_url":"https://api.github.com/users/GondarOleg/following{/other_user}","gists_url":"https://api.github.com/users/GondarOleg/gists{/gist_id}","starred_url":"https://api.github.com/users/GondarOleg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GondarOleg/subscriptions","organizations_url":"https://api.github.com/users/GondarOleg/orgs","repos_url":"https://api.github.com/users/GondarOleg/repos","events_url":"https://api.github.com/users/GondarOleg/events{/privacy}","received_events_url":"https://api.github.com/users/GondarOleg/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-04-05T22:48:21Z","updated_at":"2016-04-06T07:29:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"64ad47a1bafee37d736398362415ade622ecaf79","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/technicaltaskjava/JavaCoreHomework/pulls/76/commits","review_comments_url":"https://api.github.com/repos/technicaltaskjava/JavaCoreHomework/pulls/76/comments","review_comment_url":"https://api.github.com/repos/technicaltaskjava/JavaCoreHomework/pulls/comments{/number}","comments_url":"https://api.github.com/repos/technicaltaskjava/JavaCoreHomework/issues/76/comments","statuses_url":"https://api.github.com/repos/technicaltaskjava/JavaCoreHomework/statuses/bb51a94a0df1f47aa93e182c4e7ea266a54da490","head":{"label":"GondarOleg:master","ref":"master","sha":"bb51a94a0df1f47aa93e182c4e7ea266a54da490","user":{"login":"GondarOleg","id":17525996,"avatar_url":"https://avatars.githubusercontent.com/u/17525996?v=3","gravatar_id":"","url":"https://api.github.com/users/GondarOleg","html_url":"https://github.com/GondarOleg","followers_url":"https://api.github.com/users/GondarOleg/followers","following_url":"https://api.github.com/users/GondarOleg/following{/other_user}","gists_url":"https://api.github.com/users/GondarOleg/gists{/gist_id}","starred_url":"https://api.github.com/users/GondarOleg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GondarOleg/subscriptions","organizations_url":"https://api.github.com/users/GondarOleg/orgs","repos_url":"https://api.github.com/users/GondarOleg/repos","events_url":"https://api.github.com/users/GondarOleg/events{/privacy}","received_events_url":"https://api.github.com/users/GondarOleg/received_events","type":"User","site_admin":false},"repo":{"id":55558894,"name":"JavaCoreHomework","full_name":"GondarOleg/JavaCoreHomework","owner":{"login":"GondarOleg","id":17525996,"avatar_url":"https://avatars.githubusercontent.com/u/17525996?v=3","gravatar_id":"","url":"https://api.github.com/users/GondarOleg","html_url":"https://github.com/GondarOleg","followers_url":"https://api.github.com/users/GondarOleg/followers","following_url":"https://api.github.com/users/GondarOleg/following{/other_user}","gists_url":"https://api.github.com/users/GondarOleg/gists{/gist_id}","starred_url":"https://api.github.com/users/GondarOleg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GondarOleg/subscriptions","organizations_url":"https://api.github.com/users/GondarOleg/orgs","repos_url":"https://api.github.com/users/GondarOleg/repos","events_url":"https://api.github.com/users/GondarOleg/events{/privacy}","received_events_url":"https://api.github.com/users/GondarOleg/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/GondarOleg/JavaCoreHomework","description":"","fork":true,"url":"https://api.github.com/repos/GondarOleg/JavaCoreHomework","forks_url":"https://api.github.com/repos/GondarOleg/JavaCoreHomework/forks","keys_url":"https://api.github.com/repos/GondarOleg/JavaCoreHomework/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GondarOleg/JavaCoreHomework/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GondarOleg/JavaCoreHomework/teams","hooks_url":"https://api.github.com/repos/GondarOleg/JavaCoreHomework/hooks","issue_events_url":"https://api.github.com/repos/GondarOleg/JavaCoreHomework/issues/events{/number}","events_url":"https://api.github.com/repos/GondarOleg/JavaCoreHomework/events","assignees_url":"https://api.github.com/repos/GondarOleg/JavaCoreHomework/assignees{/user}","branches_url":"https://api.github.com/repos/GondarOleg/JavaCoreHomework/branches{/branch}","tags_url":"https://api.github.com/repos/GondarOleg/JavaCoreHomework/tags","blobs_url":"https://api.github.com/repos/GondarOleg/JavaCoreHomework/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GondarOleg/JavaCoreHomework/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GondarOleg/JavaCoreHomework/git/refs{/sha}","trees_url":"https://api.github.com/repos/GondarOleg/JavaCoreHomework/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GondarOleg/JavaCoreHomework/statuses/{sha}","languages_url":"https://api.github.com/repos/GondarOleg/JavaCoreHomework/languages","stargazers_url":"https://api.github.com/repos/GondarOleg/JavaCoreHomework/stargazers","contributors_url":"https://api.github.com/repos/GondarOleg/JavaCoreHomework/contributors","subscribers_url":"https://api.github.com/repos/GondarOleg/JavaCoreHomework/subscribers","subscription_url":"https://api.github.com/repos/GondarOleg/JavaCoreHomework/subscription","commits_url":"https://api.github.com/repos/GondarOleg/JavaCoreHomework/commits{/sha}","git_commits_url":"https://api.github.com/repos/GondarOleg/JavaCoreHomework/git/commits{/sha}","comments_url":"https://api.github.com/repos/GondarOleg/JavaCoreHomework/comments{/number}","issue_comment_url":"https://api.github.com/repos/GondarOleg/JavaCoreHomework/issues/comments{/number}","contents_url":"https://api.github.com/repos/GondarOleg/JavaCoreHomework/contents/{+path}","compare_url":"https://api.github.com/repos/GondarOleg/JavaCoreHomework/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GondarOleg/JavaCoreHomework/merges","archive_url":"https://api.github.com/repos/GondarOleg/JavaCoreHomework/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GondarOleg/JavaCoreHomework/downloads","issues_url":"https://api.github.com/repos/GondarOleg/JavaCoreHomework/issues{/number}","pulls_url":"https://api.github.com/repos/GondarOleg/JavaCoreHomework/pulls{/number}","milestones_url":"https://api.github.com/repos/GondarOleg/JavaCoreHomework/milestones{/number}","notifications_url":"https://api.github.com/repos/GondarOleg/JavaCoreHomework/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GondarOleg/JavaCoreHomework/labels{/name}","releases_url":"https://api.github.com/repos/GondarOleg/JavaCoreHomework/releases{/id}","deployments_url":"https://api.github.com/repos/GondarOleg/JavaCoreHomework/deployments","created_at":"2016-04-05T22:42:57Z","updated_at":"2016-04-05T22:42:59Z","pushed_at":"2016-04-05T22:47:51Z","git_url":"git://github.com/GondarOleg/JavaCoreHomework.git","ssh_url":"git@github.com:GondarOleg/JavaCoreHomework.git","clone_url":"https://github.com/GondarOleg/JavaCoreHomework.git","svn_url":"https://github.com/GondarOleg/JavaCoreHomework","homepage":null,"size":2501,"stargazers_count":0,"watchers_count":0,"language":"HTML","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"technicaltaskjava:master","ref":"master","sha":"fa23fe92ea4a33c0ab1bd28b55947655eba2ede5","user":{"login":"technicaltaskjava","id":17650564,"avatar_url":"https://avatars.githubusercontent.com/u/17650564?v=3","gravatar_id":"","url":"https://api.github.com/users/technicaltaskjava","html_url":"https://github.com/technicaltaskjava","followers_url":"https://api.github.com/users/technicaltaskjava/followers","following_url":"https://api.github.com/users/technicaltaskjava/following{/other_user}","gists_url":"https://api.github.com/users/technicaltaskjava/gists{/gist_id}","starred_url":"https://api.github.com/users/technicaltaskjava/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/technicaltaskjava/subscriptions","organizations_url":"https://api.github.com/users/technicaltaskjava/orgs","repos_url":"https://api.github.com/users/technicaltaskjava/repos","events_url":"https://api.github.com/users/technicaltaskjava/events{/privacy}","received_events_url":"https://api.github.com/users/technicaltaskjava/received_events","type":"User","site_admin":false},"repo":{"id":53159830,"name":"JavaCoreHomework","full_name":"technicaltaskjava/JavaCoreHomework","owner":{"login":"technicaltaskjava","id":17650564,"avatar_url":"https://avatars.githubusercontent.com/u/17650564?v=3","gravatar_id":"","url":"https://api.github.com/users/technicaltaskjava","html_url":"https://github.com/technicaltaskjava","followers_url":"https://api.github.com/users/technicaltaskjava/followers","following_url":"https://api.github.com/users/technicaltaskjava/following{/other_user}","gists_url":"https://api.github.com/users/technicaltaskjava/gists{/gist_id}","starred_url":"https://api.github.com/users/technicaltaskjava/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/technicaltaskjava/subscriptions","organizations_url":"https://api.github.com/users/technicaltaskjava/orgs","repos_url":"https://api.github.com/users/technicaltaskjava/repos","events_url":"https://api.github.com/users/technicaltaskjava/events{/privacy}","received_events_url":"https://api.github.com/users/technicaltaskjava/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/technicaltaskjava/JavaCoreHomework","description":"","fork":false,"url":"https://api.github.com/repos/technicaltaskjava/JavaCoreHomework","forks_url":"https://api.github.com/repos/technicaltaskjava/JavaCoreHomework/forks","keys_url":"https://api.github.com/repos/technicaltaskjava/JavaCoreHomework/keys{/key_id}","collaborators_url":"https://api.github.com/repos/technicaltaskjava/JavaCoreHomework/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/technicaltaskjava/JavaCoreHomework/teams","hooks_url":"https://api.github.com/repos/technicaltaskjava/JavaCoreHomework/hooks","issue_events_url":"https://api.github.com/repos/technicaltaskjava/JavaCoreHomework/issues/events{/number}","events_url":"https://api.github.com/repos/technicaltaskjava/JavaCoreHomework/events","assignees_url":"https://api.github.com/repos/technicaltaskjava/JavaCoreHomework/assignees{/user}","branches_url":"https://api.github.com/repos/technicaltaskjava/JavaCoreHomework/branches{/branch}","tags_url":"https://api.github.com/repos/technicaltaskjava/JavaCoreHomework/tags","blobs_url":"https://api.github.com/repos/technicaltaskjava/JavaCoreHomework/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/technicaltaskjava/JavaCoreHomework/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/technicaltaskjava/JavaCoreHomework/git/refs{/sha}","trees_url":"https://api.github.com/repos/technicaltaskjava/JavaCoreHomework/git/trees{/sha}","statuses_url":"https://api.github.com/repos/technicaltaskjava/JavaCoreHomework/statuses/{sha}","languages_url":"https://api.github.com/repos/technicaltaskjava/JavaCoreHomework/languages","stargazers_url":"https://api.github.com/repos/technicaltaskjava/JavaCoreHomework/stargazers","contributors_url":"https://api.github.com/repos/technicaltaskjava/JavaCoreHomework/contributors","subscribers_url":"https://api.github.com/repos/technicaltaskjava/JavaCoreHomework/subscribers","subscription_url":"https://api.github.com/repos/technicaltaskjava/JavaCoreHomework/subscription","commits_url":"https://api.github.com/repos/technicaltaskjava/JavaCoreHomework/commits{/sha}","git_commits_url":"https://api.github.com/repos/technicaltaskjava/JavaCoreHomework/git/commits{/sha}","comments_url":"https://api.github.com/repos/technicaltaskjava/JavaCoreHomework/comments{/number}","issue_comment_url":"https://api.github.com/repos/technicaltaskjava/JavaCoreHomework/issues/comments{/number}","contents_url":"https://api.github.com/repos/technicaltaskjava/JavaCoreHomework/contents/{+path}","compare_url":"https://api.github.com/repos/technicaltaskjava/JavaCoreHomework/compare/{base}...{head}","merges_url":"https://api.github.com/repos/technicaltaskjava/JavaCoreHomework/merges","archive_url":"https://api.github.com/repos/technicaltaskjava/JavaCoreHomework/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/technicaltaskjava/JavaCoreHomework/downloads","issues_url":"https://api.github.com/repos/technicaltaskjava/JavaCoreHomework/issues{/number}","pulls_url":"https://api.github.com/repos/technicaltaskjava/JavaCoreHomework/pulls{/number}","milestones_url":"https://api.github.com/repos/technicaltaskjava/JavaCoreHomework/milestones{/number}","notifications_url":"https://api.github.com/repos/technicaltaskjava/JavaCoreHomework/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/technicaltaskjava/JavaCoreHomework/labels{/name}","releases_url":"https://api.github.com/repos/technicaltaskjava/JavaCoreHomework/releases{/id}","deployments_url":"https://api.github.com/repos/technicaltaskjava/JavaCoreHomework/deployments","created_at":"2016-03-04T19:19:59Z","updated_at":"2016-03-27T13:56:52Z","pushed_at":"2016-04-06T03:56:59Z","git_url":"git://github.com/technicaltaskjava/JavaCoreHomework.git","ssh_url":"git@github.com:technicaltaskjava/JavaCoreHomework.git","clone_url":"https://github.com/technicaltaskjava/JavaCoreHomework.git","svn_url":"https://github.com/technicaltaskjava/JavaCoreHomework","homepage":null,"size":2543,"stargazers_count":0,"watchers_count":0,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":18,"mirror_url":null,"open_issues_count":14,"forks":18,"open_issues":14,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/technicaltaskjava/JavaCoreHomework/pulls/76"},"html":{"href":"https://github.com/technicaltaskjava/JavaCoreHomework/pull/76"},"issue":{"href":"https://api.github.com/repos/technicaltaskjava/JavaCoreHomework/issues/76"},"comments":{"href":"https://api.github.com/repos/technicaltaskjava/JavaCoreHomework/issues/76/comments"},"review_comments":{"href":"https://api.github.com/repos/technicaltaskjava/JavaCoreHomework/pulls/76/comments"},"review_comment":{"href":"https://api.github.com/repos/technicaltaskjava/JavaCoreHomework/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/technicaltaskjava/JavaCoreHomework/pulls/76/commits"},"statuses":{"href":"https://api.github.com/repos/technicaltaskjava/JavaCoreHomework/statuses/bb51a94a0df1f47aa93e182c4e7ea266a54da490"}}}}