{"action":"created","comment":{"url":"https://api.github.com/repos/Dimitriy1/Lab3/pulls/comments/239454733","pull_request_review_id":182237816,"id":239454733,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzOTQ1NDczMw==","diff_hunk":"@@ -0,0 +1,97 @@\n+public class CustomArrayList<T> {\n+    private Object[] data;\n+    private int size;\n+\n+    public CustomArrayList() {\n+        data = new Object[10];\n+    }\n+\n+    public CustomArrayList(int capacity) {\n+        if (capacity < 0) {\n+            throw new IllegalArgumentException();\n+        }\n+        data = new Object[capacity];\n+    }\n+\n+    public void add(T value) {\n+        ensureCapacity(size + 1);\n+        this.data[size] = value;\n+        size++;\n+    }\n+\n+    private void ensureCapacity(int capacity) {\n+        Object[] data = new Object[2 * this.data.length];\n+        if (capacity > this.data.length) {\n+            for (int i = 0; i < this.data.length; i++) {\n+                data[i] = this.data[i];\n+            }\n+            this.data = data;\n+        }\n+    }\n+\n+    public void add(T value, int index) {\n+        if (index > size || index < 0) {\n+            throw new IndexOutOfBoundsException();\n+        }\n+        ensureCapacity(size + 1);\n+        Object[] data = new Object[this.data.length + 1];\n+        int j = 0;\n+        for (int i = 0; i < data.length; i++) {\n+            if (i == index) {\n+                data[i] = value;\n+            } else {\n+                data[i] = this.data[j];\n+                j++;\n+            }\n+        }\n+        this.data = data;\n+        size++;\n+    }\n+\n+    public boolean contains(Object value) {\n+        for (Object data : this.data) {\n+            if (data.equals(value)) {\n+                return true;\n+            }\n+        }\n+        return false;\n+    }\n+\n+    public void clear() {\n+        data = new Object[10];\n+        size = 0;\n+    }\n+    \n+    public T remove(Object var) {\n+        Object[] data = new Object[this.data.length - 1];\n+        boolean flag = true;\n+        int j = 0;\n+        for (int i = 0; i < this.data.length; i++) {\n+            if (i == this.data.length - 1) {\n+                break;\n+            }\n+            if (flag && var.equals(this.data[i])) {\n+                flag = false;\n+            } else {\n+                data[j] = this.data[i];\n+                j++;\n+            }\n+        }\n+        if (j != this.data.length - 1) {\n+            this.data = data;\n+            size -= 1;\n+        }\n+        return !flag ? (T) var : null;","path":"src/CustomArrayList.java","position":84,"original_position":84,"commit_id":"e61e5bd89b97f5f03b6505ef12e8a8d232c6ae96","original_commit_id":"e61e5bd89b97f5f03b6505ef12e8a8d232c6ae96","user":{"login":"boroda4436","id":13794896,"node_id":"MDQ6VXNlcjEzNzk0ODk2","avatar_url":"https://avatars1.githubusercontent.com/u/13794896?v=4","gravatar_id":"","url":"https://api.github.com/users/boroda4436","html_url":"https://github.com/boroda4436","followers_url":"https://api.github.com/users/boroda4436/followers","following_url":"https://api.github.com/users/boroda4436/following{/other_user}","gists_url":"https://api.github.com/users/boroda4436/gists{/gist_id}","starred_url":"https://api.github.com/users/boroda4436/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/boroda4436/subscriptions","organizations_url":"https://api.github.com/users/boroda4436/orgs","repos_url":"https://api.github.com/users/boroda4436/repos","events_url":"https://api.github.com/users/boroda4436/events{/privacy}","received_events_url":"https://api.github.com/users/boroda4436/received_events","type":"User","site_admin":false},"body":"если пишем тернарный оператор \"!\" не ставим","created_at":"2018-12-06T13:38:59Z","updated_at":"2018-12-06T13:39:10Z","html_url":"https://github.com/Dimitriy1/Lab3/pull/1#discussion_r239454733","pull_request_url":"https://api.github.com/repos/Dimitriy1/Lab3/pulls/1","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/Dimitriy1/Lab3/pulls/comments/239454733"},"html":{"href":"https://github.com/Dimitriy1/Lab3/pull/1#discussion_r239454733"},"pull_request":{"href":"https://api.github.com/repos/Dimitriy1/Lab3/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/Dimitriy1/Lab3/pulls/1","id":236526471,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM2NTI2NDcx","html_url":"https://github.com/Dimitriy1/Lab3/pull/1","diff_url":"https://github.com/Dimitriy1/Lab3/pull/1.diff","patch_url":"https://github.com/Dimitriy1/Lab3/pull/1.patch","issue_url":"https://api.github.com/repos/Dimitriy1/Lab3/issues/1","number":1,"state":"open","locked":false,"title":"For lab3","user":{"login":"Dimitriy1","id":22575175,"node_id":"MDQ6VXNlcjIyNTc1MTc1","avatar_url":"https://avatars3.githubusercontent.com/u/22575175?v=4","gravatar_id":"","url":"https://api.github.com/users/Dimitriy1","html_url":"https://github.com/Dimitriy1","followers_url":"https://api.github.com/users/Dimitriy1/followers","following_url":"https://api.github.com/users/Dimitriy1/following{/other_user}","gists_url":"https://api.github.com/users/Dimitriy1/gists{/gist_id}","starred_url":"https://api.github.com/users/Dimitriy1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Dimitriy1/subscriptions","organizations_url":"https://api.github.com/users/Dimitriy1/orgs","repos_url":"https://api.github.com/users/Dimitriy1/repos","events_url":"https://api.github.com/users/Dimitriy1/events{/privacy}","received_events_url":"https://api.github.com/users/Dimitriy1/received_events","type":"User","site_admin":false},"body":"I have changed function remove","created_at":"2018-12-06T13:17:08Z","updated_at":"2018-12-06T13:39:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2c8f4e4995ad620073f628755945dc2451c381b5","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/Dimitriy1/Lab3/pulls/1/commits","review_comments_url":"https://api.github.com/repos/Dimitriy1/Lab3/pulls/1/comments","review_comment_url":"https://api.github.com/repos/Dimitriy1/Lab3/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Dimitriy1/Lab3/issues/1/comments","statuses_url":"https://api.github.com/repos/Dimitriy1/Lab3/statuses/e61e5bd89b97f5f03b6505ef12e8a8d232c6ae96","head":{"label":"Dimitriy1:forLab3","ref":"forLab3","sha":"e61e5bd89b97f5f03b6505ef12e8a8d232c6ae96","user":{"login":"Dimitriy1","id":22575175,"node_id":"MDQ6VXNlcjIyNTc1MTc1","avatar_url":"https://avatars3.githubusercontent.com/u/22575175?v=4","gravatar_id":"","url":"https://api.github.com/users/Dimitriy1","html_url":"https://github.com/Dimitriy1","followers_url":"https://api.github.com/users/Dimitriy1/followers","following_url":"https://api.github.com/users/Dimitriy1/following{/other_user}","gists_url":"https://api.github.com/users/Dimitriy1/gists{/gist_id}","starred_url":"https://api.github.com/users/Dimitriy1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Dimitriy1/subscriptions","organizations_url":"https://api.github.com/users/Dimitriy1/orgs","repos_url":"https://api.github.com/users/Dimitriy1/repos","events_url":"https://api.github.com/users/Dimitriy1/events{/privacy}","received_events_url":"https://api.github.com/users/Dimitriy1/received_events","type":"User","site_admin":false},"repo":{"id":160558004,"node_id":"MDEwOlJlcG9zaXRvcnkxNjA1NTgwMDQ=","name":"Lab3","full_name":"Dimitriy1/Lab3","private":false,"owner":{"login":"Dimitriy1","id":22575175,"node_id":"MDQ6VXNlcjIyNTc1MTc1","avatar_url":"https://avatars3.githubusercontent.com/u/22575175?v=4","gravatar_id":"","url":"https://api.github.com/users/Dimitriy1","html_url":"https://github.com/Dimitriy1","followers_url":"https://api.github.com/users/Dimitriy1/followers","following_url":"https://api.github.com/users/Dimitriy1/following{/other_user}","gists_url":"https://api.github.com/users/Dimitriy1/gists{/gist_id}","starred_url":"https://api.github.com/users/Dimitriy1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Dimitriy1/subscriptions","organizations_url":"https://api.github.com/users/Dimitriy1/orgs","repos_url":"https://api.github.com/users/Dimitriy1/repos","events_url":"https://api.github.com/users/Dimitriy1/events{/privacy}","received_events_url":"https://api.github.com/users/Dimitriy1/received_events","type":"User","site_admin":false},"html_url":"https://github.com/Dimitriy1/Lab3","description":null,"fork":false,"url":"https://api.github.com/repos/Dimitriy1/Lab3","forks_url":"https://api.github.com/repos/Dimitriy1/Lab3/forks","keys_url":"https://api.github.com/repos/Dimitriy1/Lab3/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Dimitriy1/Lab3/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Dimitriy1/Lab3/teams","hooks_url":"https://api.github.com/repos/Dimitriy1/Lab3/hooks","issue_events_url":"https://api.github.com/repos/Dimitriy1/Lab3/issues/events{/number}","events_url":"https://api.github.com/repos/Dimitriy1/Lab3/events","assignees_url":"https://api.github.com/repos/Dimitriy1/Lab3/assignees{/user}","branches_url":"https://api.github.com/repos/Dimitriy1/Lab3/branches{/branch}","tags_url":"https://api.github.com/repos/Dimitriy1/Lab3/tags","blobs_url":"https://api.github.com/repos/Dimitriy1/Lab3/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Dimitriy1/Lab3/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Dimitriy1/Lab3/git/refs{/sha}","trees_url":"https://api.github.com/repos/Dimitriy1/Lab3/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Dimitriy1/Lab3/statuses/{sha}","languages_url":"https://api.github.com/repos/Dimitriy1/Lab3/languages","stargazers_url":"https://api.github.com/repos/Dimitriy1/Lab3/stargazers","contributors_url":"https://api.github.com/repos/Dimitriy1/Lab3/contributors","subscribers_url":"https://api.github.com/repos/Dimitriy1/Lab3/subscribers","subscription_url":"https://api.github.com/repos/Dimitriy1/Lab3/subscription","commits_url":"https://api.github.com/repos/Dimitriy1/Lab3/commits{/sha}","git_commits_url":"https://api.github.com/repos/Dimitriy1/Lab3/git/commits{/sha}","comments_url":"https://api.github.com/repos/Dimitriy1/Lab3/comments{/number}","issue_comment_url":"https://api.github.com/repos/Dimitriy1/Lab3/issues/comments{/number}","contents_url":"https://api.github.com/repos/Dimitriy1/Lab3/contents/{+path}","compare_url":"https://api.github.com/repos/Dimitriy1/Lab3/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Dimitriy1/Lab3/merges","archive_url":"https://api.github.com/repos/Dimitriy1/Lab3/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Dimitriy1/Lab3/downloads","issues_url":"https://api.github.com/repos/Dimitriy1/Lab3/issues{/number}","pulls_url":"https://api.github.com/repos/Dimitriy1/Lab3/pulls{/number}","milestones_url":"https://api.github.com/repos/Dimitriy1/Lab3/milestones{/number}","notifications_url":"https://api.github.com/repos/Dimitriy1/Lab3/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Dimitriy1/Lab3/labels{/name}","releases_url":"https://api.github.com/repos/Dimitriy1/Lab3/releases{/id}","deployments_url":"https://api.github.com/repos/Dimitriy1/Lab3/deployments","created_at":"2018-12-05T18:00:46Z","updated_at":"2018-12-05T18:49:13Z","pushed_at":"2018-12-06T13:17:09Z","git_url":"git://github.com/Dimitriy1/Lab3.git","ssh_url":"git@github.com:Dimitriy1/Lab3.git","clone_url":"https://github.com/Dimitriy1/Lab3.git","svn_url":"https://github.com/Dimitriy1/Lab3","homepage":null,"size":7,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"Dimitriy1:master","ref":"master","sha":"6fb610b9f04bf9a3f309843a407e0722755d9f8d","user":{"login":"Dimitriy1","id":22575175,"node_id":"MDQ6VXNlcjIyNTc1MTc1","avatar_url":"https://avatars3.githubusercontent.com/u/22575175?v=4","gravatar_id":"","url":"https://api.github.com/users/Dimitriy1","html_url":"https://github.com/Dimitriy1","followers_url":"https://api.github.com/users/Dimitriy1/followers","following_url":"https://api.github.com/users/Dimitriy1/following{/other_user}","gists_url":"https://api.github.com/users/Dimitriy1/gists{/gist_id}","starred_url":"https://api.github.com/users/Dimitriy1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Dimitriy1/subscriptions","organizations_url":"https://api.github.com/users/Dimitriy1/orgs","repos_url":"https://api.github.com/users/Dimitriy1/repos","events_url":"https://api.github.com/users/Dimitriy1/events{/privacy}","received_events_url":"https://api.github.com/users/Dimitriy1/received_events","type":"User","site_admin":false},"repo":{"id":160558004,"node_id":"MDEwOlJlcG9zaXRvcnkxNjA1NTgwMDQ=","name":"Lab3","full_name":"Dimitriy1/Lab3","private":false,"owner":{"login":"Dimitriy1","id":22575175,"node_id":"MDQ6VXNlcjIyNTc1MTc1","avatar_url":"https://avatars3.githubusercontent.com/u/22575175?v=4","gravatar_id":"","url":"https://api.github.com/users/Dimitriy1","html_url":"https://github.com/Dimitriy1","followers_url":"https://api.github.com/users/Dimitriy1/followers","following_url":"https://api.github.com/users/Dimitriy1/following{/other_user}","gists_url":"https://api.github.com/users/Dimitriy1/gists{/gist_id}","starred_url":"https://api.github.com/users/Dimitriy1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Dimitriy1/subscriptions","organizations_url":"https://api.github.com/users/Dimitriy1/orgs","repos_url":"https://api.github.com/users/Dimitriy1/repos","events_url":"https://api.github.com/users/Dimitriy1/events{/privacy}","received_events_url":"https://api.github.com/users/Dimitriy1/received_events","type":"User","site_admin":false},"html_url":"https://github.com/Dimitriy1/Lab3","description":null,"fork":false,"url":"https://api.github.com/repos/Dimitriy1/Lab3","forks_url":"https://api.github.com/repos/Dimitriy1/Lab3/forks","keys_url":"https://api.github.com/repos/Dimitriy1/Lab3/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Dimitriy1/Lab3/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Dimitriy1/Lab3/teams","hooks_url":"https://api.github.com/repos/Dimitriy1/Lab3/hooks","issue_events_url":"https://api.github.com/repos/Dimitriy1/Lab3/issues/events{/number}","events_url":"https://api.github.com/repos/Dimitriy1/Lab3/events","assignees_url":"https://api.github.com/repos/Dimitriy1/Lab3/assignees{/user}","branches_url":"https://api.github.com/repos/Dimitriy1/Lab3/branches{/branch}","tags_url":"https://api.github.com/repos/Dimitriy1/Lab3/tags","blobs_url":"https://api.github.com/repos/Dimitriy1/Lab3/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Dimitriy1/Lab3/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Dimitriy1/Lab3/git/refs{/sha}","trees_url":"https://api.github.com/repos/Dimitriy1/Lab3/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Dimitriy1/Lab3/statuses/{sha}","languages_url":"https://api.github.com/repos/Dimitriy1/Lab3/languages","stargazers_url":"https://api.github.com/repos/Dimitriy1/Lab3/stargazers","contributors_url":"https://api.github.com/repos/Dimitriy1/Lab3/contributors","subscribers_url":"https://api.github.com/repos/Dimitriy1/Lab3/subscribers","subscription_url":"https://api.github.com/repos/Dimitriy1/Lab3/subscription","commits_url":"https://api.github.com/repos/Dimitriy1/Lab3/commits{/sha}","git_commits_url":"https://api.github.com/repos/Dimitriy1/Lab3/git/commits{/sha}","comments_url":"https://api.github.com/repos/Dimitriy1/Lab3/comments{/number}","issue_comment_url":"https://api.github.com/repos/Dimitriy1/Lab3/issues/comments{/number}","contents_url":"https://api.github.com/repos/Dimitriy1/Lab3/contents/{+path}","compare_url":"https://api.github.com/repos/Dimitriy1/Lab3/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Dimitriy1/Lab3/merges","archive_url":"https://api.github.com/repos/Dimitriy1/Lab3/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Dimitriy1/Lab3/downloads","issues_url":"https://api.github.com/repos/Dimitriy1/Lab3/issues{/number}","pulls_url":"https://api.github.com/repos/Dimitriy1/Lab3/pulls{/number}","milestones_url":"https://api.github.com/repos/Dimitriy1/Lab3/milestones{/number}","notifications_url":"https://api.github.com/repos/Dimitriy1/Lab3/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Dimitriy1/Lab3/labels{/name}","releases_url":"https://api.github.com/repos/Dimitriy1/Lab3/releases{/id}","deployments_url":"https://api.github.com/repos/Dimitriy1/Lab3/deployments","created_at":"2018-12-05T18:00:46Z","updated_at":"2018-12-05T18:49:13Z","pushed_at":"2018-12-06T13:17:09Z","git_url":"git://github.com/Dimitriy1/Lab3.git","ssh_url":"git@github.com:Dimitriy1/Lab3.git","clone_url":"https://github.com/Dimitriy1/Lab3.git","svn_url":"https://github.com/Dimitriy1/Lab3","homepage":null,"size":7,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Dimitriy1/Lab3/pulls/1"},"html":{"href":"https://github.com/Dimitriy1/Lab3/pull/1"},"issue":{"href":"https://api.github.com/repos/Dimitriy1/Lab3/issues/1"},"comments":{"href":"https://api.github.com/repos/Dimitriy1/Lab3/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/Dimitriy1/Lab3/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/Dimitriy1/Lab3/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Dimitriy1/Lab3/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/Dimitriy1/Lab3/statuses/e61e5bd89b97f5f03b6505ef12e8a8d232c6ae96"}},"author_association":"OWNER"}}
{"actor":{"display_login":"boroda4436"}}