{"action":"created","comment":{"url":"https://api.github.com/repos/technicaltaskjava/JavaCoreHomework/pulls/comments/57863892","id":57863892,"diff_hunk":"@@ -0,0 +1,51 @@\n+package com.epam.t02;\n+\n+import java.util.Arrays;\n+\n+public class CompareUtils<T> {\n+\n+    private static <T> T[] arraySorter(T[] inputArray) {\n+        T[] sortedArray = (T[]) new Object[inputArray.length];\n+        System.arraycopy(inputArray, 0, sortedArray, 0, inputArray.length);\n+        Arrays.sort(sortedArray);\n+        return sortedArray;\n+    }\n+\n+    private static <T> T[] arraySorterByComparator(T[] inputArray) {\n+        T[] sortedArray = (T[]) new Object[inputArray.length];\n+        System.arraycopy(inputArray, 0, sortedArray, 0, inputArray.length);\n+        GenericComparator genericComparator = new GenericComparator();\n+        Arrays.sort(sortedArray, genericComparator);\n+        return sortedArray;\n+    }\n+\n+    public static <T> T minElement (T[] inputArray) {\n+        T[] sortedArray = arraySorter(inputArray);\n+        return sortedArray[0];\n+    }\n+\n+    public static <T> T minElementByComparator (T[] inputArray) {\n+        T[] sortedArray = arraySorterByComparator(inputArray);\n+        return sortedArray[0];\n+    }\n+\n+    public static <T> T maxElement (T[] inputArray) {\n+        T[] sortedArray = arraySorter(inputArray);\n+        return sortedArray[(sortedArray.length-1)];","path":"Oleksii_Gerasymov/Module 5 - Annotations and Generics/src/main/java/com/epam/t02/CompareUtils.java","position":34,"original_position":34,"commit_id":"dd7d49bd29b0e4de4f198807b032d6a5e60088e0","original_commit_id":"dd7d49bd29b0e4de4f198807b032d6a5e60088e0","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) Remove those useless parentheses. [![rule](https://raw.githubusercontent.com/SonarCommunity/sonar-github/master/images/rule.png)](http://localhost:9000/coding_rules#rule_key=squid%3AUselessParenthesesCheck)\n","created_at":"2016-03-30T10:00:17Z","updated_at":"2016-03-30T10:00:17Z","html_url":"https://github.com/technicaltaskjava/JavaCoreHomework/pull/53#discussion_r57863892","pull_request_url":"https://api.github.com/repos/technicaltaskjava/JavaCoreHomework/pulls/53","_links":{"self":{"href":"https://api.github.com/repos/technicaltaskjava/JavaCoreHomework/pulls/comments/57863892"},"html":{"href":"https://github.com/technicaltaskjava/JavaCoreHomework/pull/53#discussion_r57863892"},"pull_request":{"href":"https://api.github.com/repos/technicaltaskjava/JavaCoreHomework/pulls/53"}}},"pull_request":{"url":"https://api.github.com/repos/technicaltaskjava/JavaCoreHomework/pulls/53","id":64444979,"html_url":"https://github.com/technicaltaskjava/JavaCoreHomework/pull/53","diff_url":"https://github.com/technicaltaskjava/JavaCoreHomework/pull/53.diff","patch_url":"https://github.com/technicaltaskjava/JavaCoreHomework/pull/53.patch","issue_url":"https://api.github.com/repos/technicaltaskjava/JavaCoreHomework/issues/53","number":53,"state":"open","locked":false,"title":"Oleksii_Gerasimov/Module 5 - Annotations and Generics","user":{"login":"Doozer-Dnepr","id":17525557,"avatar_url":"https://avatars.githubusercontent.com/u/17525557?v=3","gravatar_id":"","url":"https://api.github.com/users/Doozer-Dnepr","html_url":"https://github.com/Doozer-Dnepr","followers_url":"https://api.github.com/users/Doozer-Dnepr/followers","following_url":"https://api.github.com/users/Doozer-Dnepr/following{/other_user}","gists_url":"https://api.github.com/users/Doozer-Dnepr/gists{/gist_id}","starred_url":"https://api.github.com/users/Doozer-Dnepr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Doozer-Dnepr/subscriptions","organizations_url":"https://api.github.com/users/Doozer-Dnepr/orgs","repos_url":"https://api.github.com/users/Doozer-Dnepr/repos","events_url":"https://api.github.com/users/Doozer-Dnepr/events{/privacy}","received_events_url":"https://api.github.com/users/Doozer-Dnepr/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-03-29T10:37:20Z","updated_at":"2016-03-30T10:00:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1250908e0b6d903c8d3935a33407a4679ec0f13d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/technicaltaskjava/JavaCoreHomework/pulls/53/commits","review_comments_url":"https://api.github.com/repos/technicaltaskjava/JavaCoreHomework/pulls/53/comments","review_comment_url":"https://api.github.com/repos/technicaltaskjava/JavaCoreHomework/pulls/comments{/number}","comments_url":"https://api.github.com/repos/technicaltaskjava/JavaCoreHomework/issues/53/comments","statuses_url":"https://api.github.com/repos/technicaltaskjava/JavaCoreHomework/statuses/dd7d49bd29b0e4de4f198807b032d6a5e60088e0","head":{"label":"Doozer-Dnepr:master","ref":"master","sha":"dd7d49bd29b0e4de4f198807b032d6a5e60088e0","user":{"login":"Doozer-Dnepr","id":17525557,"avatar_url":"https://avatars.githubusercontent.com/u/17525557?v=3","gravatar_id":"","url":"https://api.github.com/users/Doozer-Dnepr","html_url":"https://github.com/Doozer-Dnepr","followers_url":"https://api.github.com/users/Doozer-Dnepr/followers","following_url":"https://api.github.com/users/Doozer-Dnepr/following{/other_user}","gists_url":"https://api.github.com/users/Doozer-Dnepr/gists{/gist_id}","starred_url":"https://api.github.com/users/Doozer-Dnepr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Doozer-Dnepr/subscriptions","organizations_url":"https://api.github.com/users/Doozer-Dnepr/orgs","repos_url":"https://api.github.com/users/Doozer-Dnepr/repos","events_url":"https://api.github.com/users/Doozer-Dnepr/events{/privacy}","received_events_url":"https://api.github.com/users/Doozer-Dnepr/received_events","type":"User","site_admin":false},"repo":{"id":54966995,"name":"JavaCoreHomework","full_name":"Doozer-Dnepr/JavaCoreHomework","owner":{"login":"Doozer-Dnepr","id":17525557,"avatar_url":"https://avatars.githubusercontent.com/u/17525557?v=3","gravatar_id":"","url":"https://api.github.com/users/Doozer-Dnepr","html_url":"https://github.com/Doozer-Dnepr","followers_url":"https://api.github.com/users/Doozer-Dnepr/followers","following_url":"https://api.github.com/users/Doozer-Dnepr/following{/other_user}","gists_url":"https://api.github.com/users/Doozer-Dnepr/gists{/gist_id}","starred_url":"https://api.github.com/users/Doozer-Dnepr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Doozer-Dnepr/subscriptions","organizations_url":"https://api.github.com/users/Doozer-Dnepr/orgs","repos_url":"https://api.github.com/users/Doozer-Dnepr/repos","events_url":"https://api.github.com/users/Doozer-Dnepr/events{/privacy}","received_events_url":"https://api.github.com/users/Doozer-Dnepr/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Doozer-Dnepr/JavaCoreHomework","description":"","fork":true,"url":"https://api.github.com/repos/Doozer-Dnepr/JavaCoreHomework","forks_url":"https://api.github.com/repos/Doozer-Dnepr/JavaCoreHomework/forks","keys_url":"https://api.github.com/repos/Doozer-Dnepr/JavaCoreHomework/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Doozer-Dnepr/JavaCoreHomework/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Doozer-Dnepr/JavaCoreHomework/teams","hooks_url":"https://api.github.com/repos/Doozer-Dnepr/JavaCoreHomework/hooks","issue_events_url":"https://api.github.com/repos/Doozer-Dnepr/JavaCoreHomework/issues/events{/number}","events_url":"https://api.github.com/repos/Doozer-Dnepr/JavaCoreHomework/events","assignees_url":"https://api.github.com/repos/Doozer-Dnepr/JavaCoreHomework/assignees{/user}","branches_url":"https://api.github.com/repos/Doozer-Dnepr/JavaCoreHomework/branches{/branch}","tags_url":"https://api.github.com/repos/Doozer-Dnepr/JavaCoreHomework/tags","blobs_url":"https://api.github.com/repos/Doozer-Dnepr/JavaCoreHomework/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Doozer-Dnepr/JavaCoreHomework/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Doozer-Dnepr/JavaCoreHomework/git/refs{/sha}","trees_url":"https://api.github.com/repos/Doozer-Dnepr/JavaCoreHomework/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Doozer-Dnepr/JavaCoreHomework/statuses/{sha}","languages_url":"https://api.github.com/repos/Doozer-Dnepr/JavaCoreHomework/languages","stargazers_url":"https://api.github.com/repos/Doozer-Dnepr/JavaCoreHomework/stargazers","contributors_url":"https://api.github.com/repos/Doozer-Dnepr/JavaCoreHomework/contributors","subscribers_url":"https://api.github.com/repos/Doozer-Dnepr/JavaCoreHomework/subscribers","subscription_url":"https://api.github.com/repos/Doozer-Dnepr/JavaCoreHomework/subscription","commits_url":"https://api.github.com/repos/Doozer-Dnepr/JavaCoreHomework/commits{/sha}","git_commits_url":"https://api.github.com/repos/Doozer-Dnepr/JavaCoreHomework/git/commits{/sha}","comments_url":"https://api.github.com/repos/Doozer-Dnepr/JavaCoreHomework/comments{/number}","issue_comment_url":"https://api.github.com/repos/Doozer-Dnepr/JavaCoreHomework/issues/comments{/number}","contents_url":"https://api.github.com/repos/Doozer-Dnepr/JavaCoreHomework/contents/{+path}","compare_url":"https://api.github.com/repos/Doozer-Dnepr/JavaCoreHomework/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Doozer-Dnepr/JavaCoreHomework/merges","archive_url":"https://api.github.com/repos/Doozer-Dnepr/JavaCoreHomework/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Doozer-Dnepr/JavaCoreHomework/downloads","issues_url":"https://api.github.com/repos/Doozer-Dnepr/JavaCoreHomework/issues{/number}","pulls_url":"https://api.github.com/repos/Doozer-Dnepr/JavaCoreHomework/pulls{/number}","milestones_url":"https://api.github.com/repos/Doozer-Dnepr/JavaCoreHomework/milestones{/number}","notifications_url":"https://api.github.com/repos/Doozer-Dnepr/JavaCoreHomework/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Doozer-Dnepr/JavaCoreHomework/labels{/name}","releases_url":"https://api.github.com/repos/Doozer-Dnepr/JavaCoreHomework/releases{/id}","deployments_url":"https://api.github.com/repos/Doozer-Dnepr/JavaCoreHomework/deployments","created_at":"2016-03-29T10:27:09Z","updated_at":"2016-03-29T10:27:11Z","pushed_at":"2016-03-29T10:36:06Z","git_url":"git://github.com/Doozer-Dnepr/JavaCoreHomework.git","ssh_url":"git@github.com:Doozer-Dnepr/JavaCoreHomework.git","clone_url":"https://github.com/Doozer-Dnepr/JavaCoreHomework.git","svn_url":"https://github.com/Doozer-Dnepr/JavaCoreHomework","homepage":null,"size":2497,"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":"d4c31067c40b94f1487b64656f7552a40edcddf3","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-03-29T21:16:24Z","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":2531,"stargazers_count":0,"watchers_count":0,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":17,"mirror_url":null,"open_issues_count":13,"forks":17,"open_issues":13,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/technicaltaskjava/JavaCoreHomework/pulls/53"},"html":{"href":"https://github.com/technicaltaskjava/JavaCoreHomework/pull/53"},"issue":{"href":"https://api.github.com/repos/technicaltaskjava/JavaCoreHomework/issues/53"},"comments":{"href":"https://api.github.com/repos/technicaltaskjava/JavaCoreHomework/issues/53/comments"},"review_comments":{"href":"https://api.github.com/repos/technicaltaskjava/JavaCoreHomework/pulls/53/comments"},"review_comment":{"href":"https://api.github.com/repos/technicaltaskjava/JavaCoreHomework/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/technicaltaskjava/JavaCoreHomework/pulls/53/commits"},"statuses":{"href":"https://api.github.com/repos/technicaltaskjava/JavaCoreHomework/statuses/dd7d49bd29b0e4de4f198807b032d6a5e60088e0"}}}}