{"action":"created","comment":{"url":"https://api.github.com/repos/AnastasiaBlack/ort-javabase/pulls/comments/98352461","pull_request_review_id":18992297,"id":98352461,"diff_hunk":"@@ -0,0 +1,110 @@\n+package ua.dp.mywayjawa.task13;\r\n+\r\n+import java.util.ArrayList;\r\n+import java.util.Collections;\r\n+import java.util.HashMap;\r\n+import java.util.List;\r\n+import java.util.Map;\r\n+import java.util.Scanner;\r\n+import java.util.TreeMap;\r\n+\r\n+public class AutoOwnerDirectory {\r\n+\tTreeMap<String, ArrayList<String>> ownerInfo;// = new HashMap<String,\r\n+\t\t\t\t\t\t\t\t\t\t\t\t\t// String>();\r\n+\tArrayList<String> carEntry;\r\n+\tTreeMap<ArrayList<String>, String> viceversaOwnerInfo;\r\n+\tfinal String YES = \"+\";\r\n+\tfinal String NO = \"-\";\r\n+\tScanner sc = new Scanner(System.in);\r\n+\r\n+\tpublic AutoOwnerDirectory() {\r\n+\t\tsuper();\r\n+\t\tcreateMap();\r\n+\t}\r\n+\r\n+\tpublic void createMap() {\r\n+\t\townerInfo = new TreeMap<String, ArrayList<String>>();\r\n+\t}\r\n+\r\n+\tpublic void addNewEntry() {\r\n+\t\tSystem.out.println(\"Введіть прізвище власника авто і натисніть Enter:\");\r\n+\t\tString ownerSurname = sc.nextLine();\r\n+\t\tSystem.out.println(\"Введіть номер автомобіля і натисніть Enter:\");\r\n+\t\tString carNumber = sc.nextLine();\r\n+\t\tcarEntry = new ArrayList<String>();\r\n+\t\tcarEntry.add(carNumber);\r\n+\t\townerInfo.put(ownerSurname, carEntry);\r\n+\t\tfor (int i = 0; i < carEntry.size() + 1; i++) {\r\n+\t\t\tSystem.out.println(\"Бажаєте додати ще автомобіль?(+ так, - ні)\");\r\n+\t\t\tString answer = sc.nextLine();\r\n+\t\t\tif (answer.equals(YES)) {\r\n+\t\t\t\tSystem.out.println(\"Введіть номер автомобіля і натисніть Enter:\");\r\n+\t\t\t\tcarNumber = sc.nextLine();\r\n+\t\t\t\townerInfo.get(ownerSurname).add(carNumber);\r\n+\t\t\t\tCollections.sort(ownerInfo.get(ownerSurname));\r\n+\t\t\t} else if (answer.equals(NO)) {\r\n+\t\t\t\tbreak;\r\n+\t\t\t} else {\r\n+\t\t\t\tSystem.out.println(\"Ви ввели невірний символ. \" + \"Замість \\\"+\\\" чи \\\"-\\\" ви ввели \\\"\" + answer + \"\\\"\");\r\n+\t\t\t}\r\n+\r\n+\t\t}\r\n+\r\n+\t}\r\n+\r\n+\tpublic void removeEntrybySurname() {\r\n+\t\tSystem.out.println(\"Введіть прізвище для видалення:\");\r","path":"src/ua/dp/mywayjawa/task13/AutoOwnerDirectory.java","position":56,"original_position":56,"commit_id":"fa1654ddffbbb42ea99ffd8d16d7e30716510e9d","original_commit_id":"fa1654ddffbbb42ea99ffd8d16d7e30716510e9d","user":{"login":"strazhkoe","id":1845841,"avatar_url":"https://avatars.githubusercontent.com/u/1845841?v=3","gravatar_id":"","url":"https://api.github.com/users/strazhkoe","html_url":"https://github.com/strazhkoe","followers_url":"https://api.github.com/users/strazhkoe/followers","following_url":"https://api.github.com/users/strazhkoe/following{/other_user}","gists_url":"https://api.github.com/users/strazhkoe/gists{/gist_id}","starred_url":"https://api.github.com/users/strazhkoe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/strazhkoe/subscriptions","organizations_url":"https://api.github.com/users/strazhkoe/orgs","repos_url":"https://api.github.com/users/strazhkoe/repos","events_url":"https://api.github.com/users/strazhkoe/events{/privacy}","received_events_url":"https://api.github.com/users/strazhkoe/received_events","type":"User","site_admin":false},"body":"и отсюда","created_at":"2017-01-29T13:03:47Z","updated_at":"2017-01-29T13:04:31Z","html_url":"https://github.com/AnastasiaBlack/ort-javabase/pull/13#discussion_r98352461","pull_request_url":"https://api.github.com/repos/AnastasiaBlack/ort-javabase/pulls/13","_links":{"self":{"href":"https://api.github.com/repos/AnastasiaBlack/ort-javabase/pulls/comments/98352461"},"html":{"href":"https://github.com/AnastasiaBlack/ort-javabase/pull/13#discussion_r98352461"},"pull_request":{"href":"https://api.github.com/repos/AnastasiaBlack/ort-javabase/pulls/13"}}},"pull_request":{"url":"https://api.github.com/repos/AnastasiaBlack/ort-javabase/pulls/13","id":101594555,"html_url":"https://github.com/AnastasiaBlack/ort-javabase/pull/13","diff_url":"https://github.com/AnastasiaBlack/ort-javabase/pull/13.diff","patch_url":"https://github.com/AnastasiaBlack/ort-javabase/pull/13.patch","issue_url":"https://api.github.com/repos/AnastasiaBlack/ort-javabase/issues/13","number":13,"state":"open","locked":false,"title":"Задача 13","user":{"login":"AnastasiaBlack","id":23293964,"avatar_url":"https://avatars.githubusercontent.com/u/23293964?v=3","gravatar_id":"","url":"https://api.github.com/users/AnastasiaBlack","html_url":"https://github.com/AnastasiaBlack","followers_url":"https://api.github.com/users/AnastasiaBlack/followers","following_url":"https://api.github.com/users/AnastasiaBlack/following{/other_user}","gists_url":"https://api.github.com/users/AnastasiaBlack/gists{/gist_id}","starred_url":"https://api.github.com/users/AnastasiaBlack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AnastasiaBlack/subscriptions","organizations_url":"https://api.github.com/users/AnastasiaBlack/orgs","repos_url":"https://api.github.com/users/AnastasiaBlack/repos","events_url":"https://api.github.com/users/AnastasiaBlack/events{/privacy}","received_events_url":"https://api.github.com/users/AnastasiaBlack/received_events","type":"User","site_admin":false},"body":"Выполняет все цели (добавление, редактирование, удаление, сортировка по номеру автомобиля(value) в Map). Осталось реализовать для случая, если у одного хозяина 2 и больше машин. Но как? Через список? А как тогда осуществлять поиск по номеру авто, если ключем является теперь не String, а ArrayList? ","created_at":"2017-01-15T12:47:08Z","updated_at":"2017-01-29T13:04:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a039a06a257cc3a34cac3efdb673bd259c4c1bc2","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/AnastasiaBlack/ort-javabase/pulls/13/commits","review_comments_url":"https://api.github.com/repos/AnastasiaBlack/ort-javabase/pulls/13/comments","review_comment_url":"https://api.github.com/repos/AnastasiaBlack/ort-javabase/pulls/comments{/number}","comments_url":"https://api.github.com/repos/AnastasiaBlack/ort-javabase/issues/13/comments","statuses_url":"https://api.github.com/repos/AnastasiaBlack/ort-javabase/statuses/fa1654ddffbbb42ea99ffd8d16d7e30716510e9d","head":{"label":"AnastasiaBlack:Задача_13","ref":"Задача_13","sha":"fa1654ddffbbb42ea99ffd8d16d7e30716510e9d","user":{"login":"AnastasiaBlack","id":23293964,"avatar_url":"https://avatars.githubusercontent.com/u/23293964?v=3","gravatar_id":"","url":"https://api.github.com/users/AnastasiaBlack","html_url":"https://github.com/AnastasiaBlack","followers_url":"https://api.github.com/users/AnastasiaBlack/followers","following_url":"https://api.github.com/users/AnastasiaBlack/following{/other_user}","gists_url":"https://api.github.com/users/AnastasiaBlack/gists{/gist_id}","starred_url":"https://api.github.com/users/AnastasiaBlack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AnastasiaBlack/subscriptions","organizations_url":"https://api.github.com/users/AnastasiaBlack/orgs","repos_url":"https://api.github.com/users/AnastasiaBlack/repos","events_url":"https://api.github.com/users/AnastasiaBlack/events{/privacy}","received_events_url":"https://api.github.com/users/AnastasiaBlack/received_events","type":"User","site_admin":false},"repo":{"id":73170617,"name":"ort-javabase","full_name":"AnastasiaBlack/ort-javabase","owner":{"login":"AnastasiaBlack","id":23293964,"avatar_url":"https://avatars.githubusercontent.com/u/23293964?v=3","gravatar_id":"","url":"https://api.github.com/users/AnastasiaBlack","html_url":"https://github.com/AnastasiaBlack","followers_url":"https://api.github.com/users/AnastasiaBlack/followers","following_url":"https://api.github.com/users/AnastasiaBlack/following{/other_user}","gists_url":"https://api.github.com/users/AnastasiaBlack/gists{/gist_id}","starred_url":"https://api.github.com/users/AnastasiaBlack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AnastasiaBlack/subscriptions","organizations_url":"https://api.github.com/users/AnastasiaBlack/orgs","repos_url":"https://api.github.com/users/AnastasiaBlack/repos","events_url":"https://api.github.com/users/AnastasiaBlack/events{/privacy}","received_events_url":"https://api.github.com/users/AnastasiaBlack/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/AnastasiaBlack/ort-javabase","description":"For my ort-projects","fork":false,"url":"https://api.github.com/repos/AnastasiaBlack/ort-javabase","forks_url":"https://api.github.com/repos/AnastasiaBlack/ort-javabase/forks","keys_url":"https://api.github.com/repos/AnastasiaBlack/ort-javabase/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AnastasiaBlack/ort-javabase/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AnastasiaBlack/ort-javabase/teams","hooks_url":"https://api.github.com/repos/AnastasiaBlack/ort-javabase/hooks","issue_events_url":"https://api.github.com/repos/AnastasiaBlack/ort-javabase/issues/events{/number}","events_url":"https://api.github.com/repos/AnastasiaBlack/ort-javabase/events","assignees_url":"https://api.github.com/repos/AnastasiaBlack/ort-javabase/assignees{/user}","branches_url":"https://api.github.com/repos/AnastasiaBlack/ort-javabase/branches{/branch}","tags_url":"https://api.github.com/repos/AnastasiaBlack/ort-javabase/tags","blobs_url":"https://api.github.com/repos/AnastasiaBlack/ort-javabase/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AnastasiaBlack/ort-javabase/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AnastasiaBlack/ort-javabase/git/refs{/sha}","trees_url":"https://api.github.com/repos/AnastasiaBlack/ort-javabase/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AnastasiaBlack/ort-javabase/statuses/{sha}","languages_url":"https://api.github.com/repos/AnastasiaBlack/ort-javabase/languages","stargazers_url":"https://api.github.com/repos/AnastasiaBlack/ort-javabase/stargazers","contributors_url":"https://api.github.com/repos/AnastasiaBlack/ort-javabase/contributors","subscribers_url":"https://api.github.com/repos/AnastasiaBlack/ort-javabase/subscribers","subscription_url":"https://api.github.com/repos/AnastasiaBlack/ort-javabase/subscription","commits_url":"https://api.github.com/repos/AnastasiaBlack/ort-javabase/commits{/sha}","git_commits_url":"https://api.github.com/repos/AnastasiaBlack/ort-javabase/git/commits{/sha}","comments_url":"https://api.github.com/repos/AnastasiaBlack/ort-javabase/comments{/number}","issue_comment_url":"https://api.github.com/repos/AnastasiaBlack/ort-javabase/issues/comments{/number}","contents_url":"https://api.github.com/repos/AnastasiaBlack/ort-javabase/contents/{+path}","compare_url":"https://api.github.com/repos/AnastasiaBlack/ort-javabase/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AnastasiaBlack/ort-javabase/merges","archive_url":"https://api.github.com/repos/AnastasiaBlack/ort-javabase/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AnastasiaBlack/ort-javabase/downloads","issues_url":"https://api.github.com/repos/AnastasiaBlack/ort-javabase/issues{/number}","pulls_url":"https://api.github.com/repos/AnastasiaBlack/ort-javabase/pulls{/number}","milestones_url":"https://api.github.com/repos/AnastasiaBlack/ort-javabase/milestones{/number}","notifications_url":"https://api.github.com/repos/AnastasiaBlack/ort-javabase/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AnastasiaBlack/ort-javabase/labels{/name}","releases_url":"https://api.github.com/repos/AnastasiaBlack/ort-javabase/releases{/id}","deployments_url":"https://api.github.com/repos/AnastasiaBlack/ort-javabase/deployments","created_at":"2016-11-08T09:33:55Z","updated_at":"2016-11-29T10:03:03Z","pushed_at":"2017-01-27T14:04:58Z","git_url":"git://github.com/AnastasiaBlack/ort-javabase.git","ssh_url":"git@github.com:AnastasiaBlack/ort-javabase.git","clone_url":"https://github.com/AnastasiaBlack/ort-javabase.git","svn_url":"https://github.com/AnastasiaBlack/ort-javabase","homepage":null,"size":73,"stargazers_count":1,"watchers_count":1,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":6,"forks":0,"open_issues":6,"watchers":1,"default_branch":"master"}},"base":{"label":"AnastasiaBlack:master","ref":"master","sha":"71cb853fd753f00fea64632aeb0b560a5b25280c","user":{"login":"AnastasiaBlack","id":23293964,"avatar_url":"https://avatars.githubusercontent.com/u/23293964?v=3","gravatar_id":"","url":"https://api.github.com/users/AnastasiaBlack","html_url":"https://github.com/AnastasiaBlack","followers_url":"https://api.github.com/users/AnastasiaBlack/followers","following_url":"https://api.github.com/users/AnastasiaBlack/following{/other_user}","gists_url":"https://api.github.com/users/AnastasiaBlack/gists{/gist_id}","starred_url":"https://api.github.com/users/AnastasiaBlack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AnastasiaBlack/subscriptions","organizations_url":"https://api.github.com/users/AnastasiaBlack/orgs","repos_url":"https://api.github.com/users/AnastasiaBlack/repos","events_url":"https://api.github.com/users/AnastasiaBlack/events{/privacy}","received_events_url":"https://api.github.com/users/AnastasiaBlack/received_events","type":"User","site_admin":false},"repo":{"id":73170617,"name":"ort-javabase","full_name":"AnastasiaBlack/ort-javabase","owner":{"login":"AnastasiaBlack","id":23293964,"avatar_url":"https://avatars.githubusercontent.com/u/23293964?v=3","gravatar_id":"","url":"https://api.github.com/users/AnastasiaBlack","html_url":"https://github.com/AnastasiaBlack","followers_url":"https://api.github.com/users/AnastasiaBlack/followers","following_url":"https://api.github.com/users/AnastasiaBlack/following{/other_user}","gists_url":"https://api.github.com/users/AnastasiaBlack/gists{/gist_id}","starred_url":"https://api.github.com/users/AnastasiaBlack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AnastasiaBlack/subscriptions","organizations_url":"https://api.github.com/users/AnastasiaBlack/orgs","repos_url":"https://api.github.com/users/AnastasiaBlack/repos","events_url":"https://api.github.com/users/AnastasiaBlack/events{/privacy}","received_events_url":"https://api.github.com/users/AnastasiaBlack/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/AnastasiaBlack/ort-javabase","description":"For my ort-projects","fork":false,"url":"https://api.github.com/repos/AnastasiaBlack/ort-javabase","forks_url":"https://api.github.com/repos/AnastasiaBlack/ort-javabase/forks","keys_url":"https://api.github.com/repos/AnastasiaBlack/ort-javabase/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AnastasiaBlack/ort-javabase/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AnastasiaBlack/ort-javabase/teams","hooks_url":"https://api.github.com/repos/AnastasiaBlack/ort-javabase/hooks","issue_events_url":"https://api.github.com/repos/AnastasiaBlack/ort-javabase/issues/events{/number}","events_url":"https://api.github.com/repos/AnastasiaBlack/ort-javabase/events","assignees_url":"https://api.github.com/repos/AnastasiaBlack/ort-javabase/assignees{/user}","branches_url":"https://api.github.com/repos/AnastasiaBlack/ort-javabase/branches{/branch}","tags_url":"https://api.github.com/repos/AnastasiaBlack/ort-javabase/tags","blobs_url":"https://api.github.com/repos/AnastasiaBlack/ort-javabase/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AnastasiaBlack/ort-javabase/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AnastasiaBlack/ort-javabase/git/refs{/sha}","trees_url":"https://api.github.com/repos/AnastasiaBlack/ort-javabase/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AnastasiaBlack/ort-javabase/statuses/{sha}","languages_url":"https://api.github.com/repos/AnastasiaBlack/ort-javabase/languages","stargazers_url":"https://api.github.com/repos/AnastasiaBlack/ort-javabase/stargazers","contributors_url":"https://api.github.com/repos/AnastasiaBlack/ort-javabase/contributors","subscribers_url":"https://api.github.com/repos/AnastasiaBlack/ort-javabase/subscribers","subscription_url":"https://api.github.com/repos/AnastasiaBlack/ort-javabase/subscription","commits_url":"https://api.github.com/repos/AnastasiaBlack/ort-javabase/commits{/sha}","git_commits_url":"https://api.github.com/repos/AnastasiaBlack/ort-javabase/git/commits{/sha}","comments_url":"https://api.github.com/repos/AnastasiaBlack/ort-javabase/comments{/number}","issue_comment_url":"https://api.github.com/repos/AnastasiaBlack/ort-javabase/issues/comments{/number}","contents_url":"https://api.github.com/repos/AnastasiaBlack/ort-javabase/contents/{+path}","compare_url":"https://api.github.com/repos/AnastasiaBlack/ort-javabase/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AnastasiaBlack/ort-javabase/merges","archive_url":"https://api.github.com/repos/AnastasiaBlack/ort-javabase/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AnastasiaBlack/ort-javabase/downloads","issues_url":"https://api.github.com/repos/AnastasiaBlack/ort-javabase/issues{/number}","pulls_url":"https://api.github.com/repos/AnastasiaBlack/ort-javabase/pulls{/number}","milestones_url":"https://api.github.com/repos/AnastasiaBlack/ort-javabase/milestones{/number}","notifications_url":"https://api.github.com/repos/AnastasiaBlack/ort-javabase/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AnastasiaBlack/ort-javabase/labels{/name}","releases_url":"https://api.github.com/repos/AnastasiaBlack/ort-javabase/releases{/id}","deployments_url":"https://api.github.com/repos/AnastasiaBlack/ort-javabase/deployments","created_at":"2016-11-08T09:33:55Z","updated_at":"2016-11-29T10:03:03Z","pushed_at":"2017-01-27T14:04:58Z","git_url":"git://github.com/AnastasiaBlack/ort-javabase.git","ssh_url":"git@github.com:AnastasiaBlack/ort-javabase.git","clone_url":"https://github.com/AnastasiaBlack/ort-javabase.git","svn_url":"https://github.com/AnastasiaBlack/ort-javabase","homepage":null,"size":73,"stargazers_count":1,"watchers_count":1,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":6,"forks":0,"open_issues":6,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/AnastasiaBlack/ort-javabase/pulls/13"},"html":{"href":"https://github.com/AnastasiaBlack/ort-javabase/pull/13"},"issue":{"href":"https://api.github.com/repos/AnastasiaBlack/ort-javabase/issues/13"},"comments":{"href":"https://api.github.com/repos/AnastasiaBlack/ort-javabase/issues/13/comments"},"review_comments":{"href":"https://api.github.com/repos/AnastasiaBlack/ort-javabase/pulls/13/comments"},"review_comment":{"href":"https://api.github.com/repos/AnastasiaBlack/ort-javabase/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/AnastasiaBlack/ort-javabase/pulls/13/commits"},"statuses":{"href":"https://api.github.com/repos/AnastasiaBlack/ort-javabase/statuses/fa1654ddffbbb42ea99ffd8d16d7e30716510e9d"}}}}
{"actor":{"display_login":"strazhkoe"}}