{"action":"created","comment":{"url":"https://api.github.com/repos/Rubikal23/HashMapImplementation/pulls/comments/60184983","id":60184983,"diff_hunk":"@@ -0,0 +1,101 @@\n+public class HashMap<E,E1> {\r\n+\t\r\n+\tprivate E [] key ;\r\n+\tprivate E1 [] value;\r\n+\tint size = 10000;\r\n+\t\r\n+//\tprivate static int index = -1;\r\n+\t\r\n+\t@SuppressWarnings(\"unchecked\")\r\n+\tpublic HashMap()\r\n+\t{\r\n+\t\tkey = (E[]) new Object[size];\r\n+\t\tvalue = (E1[]) new Object[size];\r\n+\t}\r\n+\t\r\n+\r\n+\tpublic E1 get(E key)\r\n+\t{\r\n+\t\tint index = getIndexValue(key);\r\n+\t\tint count = 0;\r\n+\t\t\r\n+\t\r\n+\t\tif(this.key[index] == key)\r\n+\t\t\treturn (E1)this.value[index];\r\n+\t\t\r\n+\t\telse{\r\n+\t\t\twhile(this.key[index] != key)\r\n+\t\t\t{\r\n+\t\t\t\tindex++;count++;\r\n+\t\t\t\r\n+\t\t\t\tif(index == size)\r\n+\t\t\t\t\tindex = 0;\r\n+\t\t\t\tif(count == size - 1)\r\n+\t\t\t\t\treturn null;\r\n+\t\t\t}\r\n+\t\t\r\n+\t\t\treturn (E1)this.value[index];\r\n+\t\t}\r\n+\t\t\r\n+\t}\r\n+\t\r\n+\r\n+\tpublic void put(E key, E1 value)\r\n+\t{\r\n+\t\tint index = getIndexValue(key);\r\n+\t\t\r\n+\t\tif(get(key) == null){\r\n+\t\t\tif(this.key[index] == null){\r\n+\t\t\t\t\r\n+\t\t\t\tthis.key[index] = key;\r\n+\t\t\t\tthis.value[index] = value;\r\n+\t\t\t}\r\n+\t\t\telse{\r\n+\t\t\t\twhile(this.key[index] != null)\r\n+\t\t\t\t{\r\n+\t\t\t\t\tindex++;\r\n+\t\t\t\t\tif(index == size)\r\n+\t\t\t\t\t\tindex = 0;\r\n+\t\t\t\t}\r\n+\t\t\t\r\n+\t\t\t\tthis.key[index] = key;\r\n+\t\t\t\tthis.value[index] = value;\r\n+\t\t\t}\r\n+\t\t}\t\r\n+\t\telse System.out.println(\"Key already exist.\");\r\n+\t}\r\n+\t\r\n+\tpublic int getIndexValue(E key)\r\n+\t{\r\n+\t\tint index = 0;\r\n+\t\t\r\n+\t\tif(key instanceof Integer){\r\n+\t\t\t//System.out.println(\"Integer \" + key);\r\n+\t\t\tindex = (int) key;\r\n+\t\t}\r\n+\t\telse if (key instanceof String)\r\n+\t\t{\r\n+\t\t\tint sum = 0;\r\n+\t\t\tchar [] ch = ((String) key).toCharArray();\t\r\n+\t\t\tfor(int i  = 0 ; i < ch.length; i++)\r\n+\t\t\t\tsum += (int)ch[i] - 64;\r\n+\t\t\t\r\n+\t\t\tindex = sum;\r\n+\t\t\t//System.out.println(\"String \"+ index);\r\n+\t\t}\r\n+\t\treturn index;\r\n+\t}\r\n+\t\r\n+\tpublic Object remove(Object key)\r\n+\t{\r\n+\t/*\tint i = this.key.indexOf(key);\r","path":"HashMap.java","position":91,"original_position":91,"commit_id":"01314d160a843c3ab8cebe7b3c0dd7e5da4057f4","original_commit_id":"01314d160a843c3ab8cebe7b3c0dd7e5da4057f4","user":{"login":"knoxxs","id":1270959,"avatar_url":"https://avatars.githubusercontent.com/u/1270959?v=3","gravatar_id":"","url":"https://api.github.com/users/knoxxs","html_url":"https://github.com/knoxxs","followers_url":"https://api.github.com/users/knoxxs/followers","following_url":"https://api.github.com/users/knoxxs/following{/other_user}","gists_url":"https://api.github.com/users/knoxxs/gists{/gist_id}","starred_url":"https://api.github.com/users/knoxxs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/knoxxs/subscriptions","organizations_url":"https://api.github.com/users/knoxxs/orgs","repos_url":"https://api.github.com/users/knoxxs/repos","events_url":"https://api.github.com/users/knoxxs/events{/privacy}","received_events_url":"https://api.github.com/users/knoxxs/received_events","type":"User","site_admin":false},"body":"better way to not implement it","created_at":"2016-04-19T07:40:45Z","updated_at":"2016-04-19T07:40:45Z","html_url":"https://github.com/Rubikal23/HashMapImplementation/pull/4#discussion_r60184983","pull_request_url":"https://api.github.com/repos/Rubikal23/HashMapImplementation/pulls/4","_links":{"self":{"href":"https://api.github.com/repos/Rubikal23/HashMapImplementation/pulls/comments/60184983"},"html":{"href":"https://github.com/Rubikal23/HashMapImplementation/pull/4#discussion_r60184983"},"pull_request":{"href":"https://api.github.com/repos/Rubikal23/HashMapImplementation/pulls/4"}}},"pull_request":{"url":"https://api.github.com/repos/Rubikal23/HashMapImplementation/pulls/4","id":66739164,"html_url":"https://github.com/Rubikal23/HashMapImplementation/pull/4","diff_url":"https://github.com/Rubikal23/HashMapImplementation/pull/4.diff","patch_url":"https://github.com/Rubikal23/HashMapImplementation/pull/4.patch","issue_url":"https://api.github.com/repos/Rubikal23/HashMapImplementation/issues/4","number":4,"state":"open","locked":false,"title":"To review","user":{"login":"knoxxs","id":1270959,"avatar_url":"https://avatars.githubusercontent.com/u/1270959?v=3","gravatar_id":"","url":"https://api.github.com/users/knoxxs","html_url":"https://github.com/knoxxs","followers_url":"https://api.github.com/users/knoxxs/followers","following_url":"https://api.github.com/users/knoxxs/following{/other_user}","gists_url":"https://api.github.com/users/knoxxs/gists{/gist_id}","starred_url":"https://api.github.com/users/knoxxs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/knoxxs/subscriptions","organizations_url":"https://api.github.com/users/knoxxs/orgs","repos_url":"https://api.github.com/users/knoxxs/repos","events_url":"https://api.github.com/users/knoxxs/events{/privacy}","received_events_url":"https://api.github.com/users/knoxxs/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-04-16T14:17:01Z","updated_at":"2016-04-19T07:40:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"19d2b0948d9e3549db0c18e85143df145b83457f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Rubikal23/HashMapImplementation/pulls/4/commits","review_comments_url":"https://api.github.com/repos/Rubikal23/HashMapImplementation/pulls/4/comments","review_comment_url":"https://api.github.com/repos/Rubikal23/HashMapImplementation/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Rubikal23/HashMapImplementation/issues/4/comments","statuses_url":"https://api.github.com/repos/Rubikal23/HashMapImplementation/statuses/01314d160a843c3ab8cebe7b3c0dd7e5da4057f4","head":{"label":"Rubikal23:master","ref":"master","sha":"01314d160a843c3ab8cebe7b3c0dd7e5da4057f4","user":{"login":"Rubikal23","id":8860620,"avatar_url":"https://avatars.githubusercontent.com/u/8860620?v=3","gravatar_id":"","url":"https://api.github.com/users/Rubikal23","html_url":"https://github.com/Rubikal23","followers_url":"https://api.github.com/users/Rubikal23/followers","following_url":"https://api.github.com/users/Rubikal23/following{/other_user}","gists_url":"https://api.github.com/users/Rubikal23/gists{/gist_id}","starred_url":"https://api.github.com/users/Rubikal23/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Rubikal23/subscriptions","organizations_url":"https://api.github.com/users/Rubikal23/orgs","repos_url":"https://api.github.com/users/Rubikal23/repos","events_url":"https://api.github.com/users/Rubikal23/events{/privacy}","received_events_url":"https://api.github.com/users/Rubikal23/received_events","type":"User","site_admin":false},"repo":{"id":56250247,"name":"HashMapImplementation","full_name":"Rubikal23/HashMapImplementation","owner":{"login":"Rubikal23","id":8860620,"avatar_url":"https://avatars.githubusercontent.com/u/8860620?v=3","gravatar_id":"","url":"https://api.github.com/users/Rubikal23","html_url":"https://github.com/Rubikal23","followers_url":"https://api.github.com/users/Rubikal23/followers","following_url":"https://api.github.com/users/Rubikal23/following{/other_user}","gists_url":"https://api.github.com/users/Rubikal23/gists{/gist_id}","starred_url":"https://api.github.com/users/Rubikal23/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Rubikal23/subscriptions","organizations_url":"https://api.github.com/users/Rubikal23/orgs","repos_url":"https://api.github.com/users/Rubikal23/repos","events_url":"https://api.github.com/users/Rubikal23/events{/privacy}","received_events_url":"https://api.github.com/users/Rubikal23/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Rubikal23/HashMapImplementation","description":"","fork":false,"url":"https://api.github.com/repos/Rubikal23/HashMapImplementation","forks_url":"https://api.github.com/repos/Rubikal23/HashMapImplementation/forks","keys_url":"https://api.github.com/repos/Rubikal23/HashMapImplementation/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Rubikal23/HashMapImplementation/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Rubikal23/HashMapImplementation/teams","hooks_url":"https://api.github.com/repos/Rubikal23/HashMapImplementation/hooks","issue_events_url":"https://api.github.com/repos/Rubikal23/HashMapImplementation/issues/events{/number}","events_url":"https://api.github.com/repos/Rubikal23/HashMapImplementation/events","assignees_url":"https://api.github.com/repos/Rubikal23/HashMapImplementation/assignees{/user}","branches_url":"https://api.github.com/repos/Rubikal23/HashMapImplementation/branches{/branch}","tags_url":"https://api.github.com/repos/Rubikal23/HashMapImplementation/tags","blobs_url":"https://api.github.com/repos/Rubikal23/HashMapImplementation/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Rubikal23/HashMapImplementation/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Rubikal23/HashMapImplementation/git/refs{/sha}","trees_url":"https://api.github.com/repos/Rubikal23/HashMapImplementation/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Rubikal23/HashMapImplementation/statuses/{sha}","languages_url":"https://api.github.com/repos/Rubikal23/HashMapImplementation/languages","stargazers_url":"https://api.github.com/repos/Rubikal23/HashMapImplementation/stargazers","contributors_url":"https://api.github.com/repos/Rubikal23/HashMapImplementation/contributors","subscribers_url":"https://api.github.com/repos/Rubikal23/HashMapImplementation/subscribers","subscription_url":"https://api.github.com/repos/Rubikal23/HashMapImplementation/subscription","commits_url":"https://api.github.com/repos/Rubikal23/HashMapImplementation/commits{/sha}","git_commits_url":"https://api.github.com/repos/Rubikal23/HashMapImplementation/git/commits{/sha}","comments_url":"https://api.github.com/repos/Rubikal23/HashMapImplementation/comments{/number}","issue_comment_url":"https://api.github.com/repos/Rubikal23/HashMapImplementation/issues/comments{/number}","contents_url":"https://api.github.com/repos/Rubikal23/HashMapImplementation/contents/{+path}","compare_url":"https://api.github.com/repos/Rubikal23/HashMapImplementation/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Rubikal23/HashMapImplementation/merges","archive_url":"https://api.github.com/repos/Rubikal23/HashMapImplementation/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Rubikal23/HashMapImplementation/downloads","issues_url":"https://api.github.com/repos/Rubikal23/HashMapImplementation/issues{/number}","pulls_url":"https://api.github.com/repos/Rubikal23/HashMapImplementation/pulls{/number}","milestones_url":"https://api.github.com/repos/Rubikal23/HashMapImplementation/milestones{/number}","notifications_url":"https://api.github.com/repos/Rubikal23/HashMapImplementation/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Rubikal23/HashMapImplementation/labels{/name}","releases_url":"https://api.github.com/repos/Rubikal23/HashMapImplementation/releases{/id}","deployments_url":"https://api.github.com/repos/Rubikal23/HashMapImplementation/deployments","created_at":"2016-04-14T15:47:42Z","updated_at":"2016-04-14T18:49:41Z","pushed_at":"2016-04-17T21:10:44Z","git_url":"git://github.com/Rubikal23/HashMapImplementation.git","ssh_url":"git@github.com:Rubikal23/HashMapImplementation.git","clone_url":"https://github.com/Rubikal23/HashMapImplementation.git","svn_url":"https://github.com/Rubikal23/HashMapImplementation","homepage":null,"size":4,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"Rubikal23:to_review","ref":"to_review","sha":"2f53173bfb331e379dea9f97b54078ed567d13d1","user":{"login":"Rubikal23","id":8860620,"avatar_url":"https://avatars.githubusercontent.com/u/8860620?v=3","gravatar_id":"","url":"https://api.github.com/users/Rubikal23","html_url":"https://github.com/Rubikal23","followers_url":"https://api.github.com/users/Rubikal23/followers","following_url":"https://api.github.com/users/Rubikal23/following{/other_user}","gists_url":"https://api.github.com/users/Rubikal23/gists{/gist_id}","starred_url":"https://api.github.com/users/Rubikal23/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Rubikal23/subscriptions","organizations_url":"https://api.github.com/users/Rubikal23/orgs","repos_url":"https://api.github.com/users/Rubikal23/repos","events_url":"https://api.github.com/users/Rubikal23/events{/privacy}","received_events_url":"https://api.github.com/users/Rubikal23/received_events","type":"User","site_admin":false},"repo":{"id":56250247,"name":"HashMapImplementation","full_name":"Rubikal23/HashMapImplementation","owner":{"login":"Rubikal23","id":8860620,"avatar_url":"https://avatars.githubusercontent.com/u/8860620?v=3","gravatar_id":"","url":"https://api.github.com/users/Rubikal23","html_url":"https://github.com/Rubikal23","followers_url":"https://api.github.com/users/Rubikal23/followers","following_url":"https://api.github.com/users/Rubikal23/following{/other_user}","gists_url":"https://api.github.com/users/Rubikal23/gists{/gist_id}","starred_url":"https://api.github.com/users/Rubikal23/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Rubikal23/subscriptions","organizations_url":"https://api.github.com/users/Rubikal23/orgs","repos_url":"https://api.github.com/users/Rubikal23/repos","events_url":"https://api.github.com/users/Rubikal23/events{/privacy}","received_events_url":"https://api.github.com/users/Rubikal23/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Rubikal23/HashMapImplementation","description":"","fork":false,"url":"https://api.github.com/repos/Rubikal23/HashMapImplementation","forks_url":"https://api.github.com/repos/Rubikal23/HashMapImplementation/forks","keys_url":"https://api.github.com/repos/Rubikal23/HashMapImplementation/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Rubikal23/HashMapImplementation/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Rubikal23/HashMapImplementation/teams","hooks_url":"https://api.github.com/repos/Rubikal23/HashMapImplementation/hooks","issue_events_url":"https://api.github.com/repos/Rubikal23/HashMapImplementation/issues/events{/number}","events_url":"https://api.github.com/repos/Rubikal23/HashMapImplementation/events","assignees_url":"https://api.github.com/repos/Rubikal23/HashMapImplementation/assignees{/user}","branches_url":"https://api.github.com/repos/Rubikal23/HashMapImplementation/branches{/branch}","tags_url":"https://api.github.com/repos/Rubikal23/HashMapImplementation/tags","blobs_url":"https://api.github.com/repos/Rubikal23/HashMapImplementation/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Rubikal23/HashMapImplementation/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Rubikal23/HashMapImplementation/git/refs{/sha}","trees_url":"https://api.github.com/repos/Rubikal23/HashMapImplementation/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Rubikal23/HashMapImplementation/statuses/{sha}","languages_url":"https://api.github.com/repos/Rubikal23/HashMapImplementation/languages","stargazers_url":"https://api.github.com/repos/Rubikal23/HashMapImplementation/stargazers","contributors_url":"https://api.github.com/repos/Rubikal23/HashMapImplementation/contributors","subscribers_url":"https://api.github.com/repos/Rubikal23/HashMapImplementation/subscribers","subscription_url":"https://api.github.com/repos/Rubikal23/HashMapImplementation/subscription","commits_url":"https://api.github.com/repos/Rubikal23/HashMapImplementation/commits{/sha}","git_commits_url":"https://api.github.com/repos/Rubikal23/HashMapImplementation/git/commits{/sha}","comments_url":"https://api.github.com/repos/Rubikal23/HashMapImplementation/comments{/number}","issue_comment_url":"https://api.github.com/repos/Rubikal23/HashMapImplementation/issues/comments{/number}","contents_url":"https://api.github.com/repos/Rubikal23/HashMapImplementation/contents/{+path}","compare_url":"https://api.github.com/repos/Rubikal23/HashMapImplementation/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Rubikal23/HashMapImplementation/merges","archive_url":"https://api.github.com/repos/Rubikal23/HashMapImplementation/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Rubikal23/HashMapImplementation/downloads","issues_url":"https://api.github.com/repos/Rubikal23/HashMapImplementation/issues{/number}","pulls_url":"https://api.github.com/repos/Rubikal23/HashMapImplementation/pulls{/number}","milestones_url":"https://api.github.com/repos/Rubikal23/HashMapImplementation/milestones{/number}","notifications_url":"https://api.github.com/repos/Rubikal23/HashMapImplementation/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Rubikal23/HashMapImplementation/labels{/name}","releases_url":"https://api.github.com/repos/Rubikal23/HashMapImplementation/releases{/id}","deployments_url":"https://api.github.com/repos/Rubikal23/HashMapImplementation/deployments","created_at":"2016-04-14T15:47:42Z","updated_at":"2016-04-14T18:49:41Z","pushed_at":"2016-04-17T21:10:44Z","git_url":"git://github.com/Rubikal23/HashMapImplementation.git","ssh_url":"git@github.com:Rubikal23/HashMapImplementation.git","clone_url":"https://github.com/Rubikal23/HashMapImplementation.git","svn_url":"https://github.com/Rubikal23/HashMapImplementation","homepage":null,"size":4,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Rubikal23/HashMapImplementation/pulls/4"},"html":{"href":"https://github.com/Rubikal23/HashMapImplementation/pull/4"},"issue":{"href":"https://api.github.com/repos/Rubikal23/HashMapImplementation/issues/4"},"comments":{"href":"https://api.github.com/repos/Rubikal23/HashMapImplementation/issues/4/comments"},"review_comments":{"href":"https://api.github.com/repos/Rubikal23/HashMapImplementation/pulls/4/comments"},"review_comment":{"href":"https://api.github.com/repos/Rubikal23/HashMapImplementation/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Rubikal23/HashMapImplementation/pulls/4/commits"},"statuses":{"href":"https://api.github.com/repos/Rubikal23/HashMapImplementation/statuses/01314d160a843c3ab8cebe7b3c0dd7e5da4057f4"}}}}