{"action":"created","comment":{"url":"https://api.github.com/repos/Vladim8r/TASK-1/pulls/comments/196691696","pull_request_review_id":130284643,"id":196691696,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5NjY5MTY5Ng==","diff_hunk":"@@ -0,0 +1,58 @@\n+package ru.goncharuk.factory;\n+import ru.goncharuk.exist.DocumentExistExeption;\n+import ru.goncharuk.Main;\n+import ru.goncharuk.creators.Creator;\n+import ru.goncharuk.creators.IncomingCreator;\n+import ru.goncharuk.creators.OutgoingCreator;\n+import ru.goncharuk.creators.TaskCreator;\n+import ru.goncharuk.documents.Document;\n+\n+import java.util.*;\n+\n+/**\n+ * Фабрика документов\n+ */\n+public class DocFactory {\n+\n+    private static Set<Integer> setRegnum = new HashSet<>();\n+\n+    /**\n+     * Создает документ по типу\n+     * @param kind Тип документа\n+     * @return Документ\n+     * @throws DocumentExistExeption\n+     */\n+    public static Document makeDocument(String kind) throws DocumentExistExeption {","path":"src/ru/goncharuk/factory/DocFactory.java","position":25,"original_position":25,"commit_id":"e8672ce56924dca9426021cdd277e5309325e686","original_commit_id":"f1fb8ce4a0f14a2e496ec088e49e73d3e7cbb9c8","user":{"login":"DYapparov","id":16102464,"node_id":"MDQ6VXNlcjE2MTAyNDY0","avatar_url":"https://avatars1.githubusercontent.com/u/16102464?v=4","gravatar_id":"","url":"https://api.github.com/users/DYapparov","html_url":"https://github.com/DYapparov","followers_url":"https://api.github.com/users/DYapparov/followers","following_url":"https://api.github.com/users/DYapparov/following{/other_user}","gists_url":"https://api.github.com/users/DYapparov/gists{/gist_id}","starred_url":"https://api.github.com/users/DYapparov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DYapparov/subscriptions","organizations_url":"https://api.github.com/users/DYapparov/orgs","repos_url":"https://api.github.com/users/DYapparov/repos","events_url":"https://api.github.com/users/DYapparov/events{/privacy}","received_events_url":"https://api.github.com/users/DYapparov/received_events","type":"User","site_admin":false},"body":"желательно создать и использовать enum с классами документов (в который можно будет и фактори положить если ще), либо как твой друг, использовать Map<Class, Factory>.\r\nХороший пример https://docs.oracle.com/javase/tutorial/java/javaOO/enum.html","created_at":"2018-06-20T08:38:42Z","updated_at":"2018-06-20T09:04:57Z","html_url":"https://github.com/Vladim8r/TASK-1/pull/1#discussion_r196691696","pull_request_url":"https://api.github.com/repos/Vladim8r/TASK-1/pulls/1","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/Vladim8r/TASK-1/pulls/comments/196691696"},"html":{"href":"https://github.com/Vladim8r/TASK-1/pull/1#discussion_r196691696"},"pull_request":{"href":"https://api.github.com/repos/Vladim8r/TASK-1/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/Vladim8r/TASK-1/pulls/1","id":195751871,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk1NzUxODcx","html_url":"https://github.com/Vladim8r/TASK-1/pull/1","diff_url":"https://github.com/Vladim8r/TASK-1/pull/1.diff","patch_url":"https://github.com/Vladim8r/TASK-1/pull/1.patch","issue_url":"https://api.github.com/repos/Vladim8r/TASK-1/issues/1","number":1,"state":"open","locked":false,"title":"task-1","user":{"login":"Vladim8r","id":39942321,"node_id":"MDQ6VXNlcjM5OTQyMzIx","avatar_url":"https://avatars0.githubusercontent.com/u/39942321?v=4","gravatar_id":"","url":"https://api.github.com/users/Vladim8r","html_url":"https://github.com/Vladim8r","followers_url":"https://api.github.com/users/Vladim8r/followers","following_url":"https://api.github.com/users/Vladim8r/following{/other_user}","gists_url":"https://api.github.com/users/Vladim8r/gists{/gist_id}","starred_url":"https://api.github.com/users/Vladim8r/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Vladim8r/subscriptions","organizations_url":"https://api.github.com/users/Vladim8r/orgs","repos_url":"https://api.github.com/users/Vladim8r/repos","events_url":"https://api.github.com/users/Vladim8r/events{/privacy}","received_events_url":"https://api.github.com/users/Vladim8r/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-06-19T08:43:42Z","updated_at":"2018-06-20T09:04:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"471a061cb59aaf7294fcfbf3f160a440f73ab97a","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/Vladim8r/TASK-1/pulls/1/commits","review_comments_url":"https://api.github.com/repos/Vladim8r/TASK-1/pulls/1/comments","review_comment_url":"https://api.github.com/repos/Vladim8r/TASK-1/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Vladim8r/TASK-1/issues/1/comments","statuses_url":"https://api.github.com/repos/Vladim8r/TASK-1/statuses/e8672ce56924dca9426021cdd277e5309325e686","head":{"label":"Vladim8r:dev","ref":"dev","sha":"e8672ce56924dca9426021cdd277e5309325e686","user":{"login":"Vladim8r","id":39942321,"node_id":"MDQ6VXNlcjM5OTQyMzIx","avatar_url":"https://avatars0.githubusercontent.com/u/39942321?v=4","gravatar_id":"","url":"https://api.github.com/users/Vladim8r","html_url":"https://github.com/Vladim8r","followers_url":"https://api.github.com/users/Vladim8r/followers","following_url":"https://api.github.com/users/Vladim8r/following{/other_user}","gists_url":"https://api.github.com/users/Vladim8r/gists{/gist_id}","starred_url":"https://api.github.com/users/Vladim8r/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Vladim8r/subscriptions","organizations_url":"https://api.github.com/users/Vladim8r/orgs","repos_url":"https://api.github.com/users/Vladim8r/repos","events_url":"https://api.github.com/users/Vladim8r/events{/privacy}","received_events_url":"https://api.github.com/users/Vladim8r/received_events","type":"User","site_admin":false},"repo":{"id":137720165,"node_id":"MDEwOlJlcG9zaXRvcnkxMzc3MjAxNjU=","name":"TASK-1","full_name":"Vladim8r/TASK-1","owner":{"login":"Vladim8r","id":39942321,"node_id":"MDQ6VXNlcjM5OTQyMzIx","avatar_url":"https://avatars0.githubusercontent.com/u/39942321?v=4","gravatar_id":"","url":"https://api.github.com/users/Vladim8r","html_url":"https://github.com/Vladim8r","followers_url":"https://api.github.com/users/Vladim8r/followers","following_url":"https://api.github.com/users/Vladim8r/following{/other_user}","gists_url":"https://api.github.com/users/Vladim8r/gists{/gist_id}","starred_url":"https://api.github.com/users/Vladim8r/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Vladim8r/subscriptions","organizations_url":"https://api.github.com/users/Vladim8r/orgs","repos_url":"https://api.github.com/users/Vladim8r/repos","events_url":"https://api.github.com/users/Vladim8r/events{/privacy}","received_events_url":"https://api.github.com/users/Vladim8r/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Vladim8r/TASK-1","description":null,"fork":false,"url":"https://api.github.com/repos/Vladim8r/TASK-1","forks_url":"https://api.github.com/repos/Vladim8r/TASK-1/forks","keys_url":"https://api.github.com/repos/Vladim8r/TASK-1/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Vladim8r/TASK-1/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Vladim8r/TASK-1/teams","hooks_url":"https://api.github.com/repos/Vladim8r/TASK-1/hooks","issue_events_url":"https://api.github.com/repos/Vladim8r/TASK-1/issues/events{/number}","events_url":"https://api.github.com/repos/Vladim8r/TASK-1/events","assignees_url":"https://api.github.com/repos/Vladim8r/TASK-1/assignees{/user}","branches_url":"https://api.github.com/repos/Vladim8r/TASK-1/branches{/branch}","tags_url":"https://api.github.com/repos/Vladim8r/TASK-1/tags","blobs_url":"https://api.github.com/repos/Vladim8r/TASK-1/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Vladim8r/TASK-1/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Vladim8r/TASK-1/git/refs{/sha}","trees_url":"https://api.github.com/repos/Vladim8r/TASK-1/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Vladim8r/TASK-1/statuses/{sha}","languages_url":"https://api.github.com/repos/Vladim8r/TASK-1/languages","stargazers_url":"https://api.github.com/repos/Vladim8r/TASK-1/stargazers","contributors_url":"https://api.github.com/repos/Vladim8r/TASK-1/contributors","subscribers_url":"https://api.github.com/repos/Vladim8r/TASK-1/subscribers","subscription_url":"https://api.github.com/repos/Vladim8r/TASK-1/subscription","commits_url":"https://api.github.com/repos/Vladim8r/TASK-1/commits{/sha}","git_commits_url":"https://api.github.com/repos/Vladim8r/TASK-1/git/commits{/sha}","comments_url":"https://api.github.com/repos/Vladim8r/TASK-1/comments{/number}","issue_comment_url":"https://api.github.com/repos/Vladim8r/TASK-1/issues/comments{/number}","contents_url":"https://api.github.com/repos/Vladim8r/TASK-1/contents/{+path}","compare_url":"https://api.github.com/repos/Vladim8r/TASK-1/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Vladim8r/TASK-1/merges","archive_url":"https://api.github.com/repos/Vladim8r/TASK-1/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Vladim8r/TASK-1/downloads","issues_url":"https://api.github.com/repos/Vladim8r/TASK-1/issues{/number}","pulls_url":"https://api.github.com/repos/Vladim8r/TASK-1/pulls{/number}","milestones_url":"https://api.github.com/repos/Vladim8r/TASK-1/milestones{/number}","notifications_url":"https://api.github.com/repos/Vladim8r/TASK-1/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Vladim8r/TASK-1/labels{/name}","releases_url":"https://api.github.com/repos/Vladim8r/TASK-1/releases{/id}","deployments_url":"https://api.github.com/repos/Vladim8r/TASK-1/deployments","created_at":"2018-06-18T07:08:36Z","updated_at":"2018-06-18T07:08:39Z","pushed_at":"2018-06-20T08:42:46Z","git_url":"git://github.com/Vladim8r/TASK-1.git","ssh_url":"git@github.com:Vladim8r/TASK-1.git","clone_url":"https://github.com/Vladim8r/TASK-1.git","svn_url":"https://github.com/Vladim8r/TASK-1","homepage":null,"size":14,"stargazers_count":0,"watchers_count":0,"language":null,"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":"Vladim8r:master","ref":"master","sha":"34dece18257101240a702bf3c8f2e903722c157f","user":{"login":"Vladim8r","id":39942321,"node_id":"MDQ6VXNlcjM5OTQyMzIx","avatar_url":"https://avatars0.githubusercontent.com/u/39942321?v=4","gravatar_id":"","url":"https://api.github.com/users/Vladim8r","html_url":"https://github.com/Vladim8r","followers_url":"https://api.github.com/users/Vladim8r/followers","following_url":"https://api.github.com/users/Vladim8r/following{/other_user}","gists_url":"https://api.github.com/users/Vladim8r/gists{/gist_id}","starred_url":"https://api.github.com/users/Vladim8r/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Vladim8r/subscriptions","organizations_url":"https://api.github.com/users/Vladim8r/orgs","repos_url":"https://api.github.com/users/Vladim8r/repos","events_url":"https://api.github.com/users/Vladim8r/events{/privacy}","received_events_url":"https://api.github.com/users/Vladim8r/received_events","type":"User","site_admin":false},"repo":{"id":137720165,"node_id":"MDEwOlJlcG9zaXRvcnkxMzc3MjAxNjU=","name":"TASK-1","full_name":"Vladim8r/TASK-1","owner":{"login":"Vladim8r","id":39942321,"node_id":"MDQ6VXNlcjM5OTQyMzIx","avatar_url":"https://avatars0.githubusercontent.com/u/39942321?v=4","gravatar_id":"","url":"https://api.github.com/users/Vladim8r","html_url":"https://github.com/Vladim8r","followers_url":"https://api.github.com/users/Vladim8r/followers","following_url":"https://api.github.com/users/Vladim8r/following{/other_user}","gists_url":"https://api.github.com/users/Vladim8r/gists{/gist_id}","starred_url":"https://api.github.com/users/Vladim8r/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Vladim8r/subscriptions","organizations_url":"https://api.github.com/users/Vladim8r/orgs","repos_url":"https://api.github.com/users/Vladim8r/repos","events_url":"https://api.github.com/users/Vladim8r/events{/privacy}","received_events_url":"https://api.github.com/users/Vladim8r/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Vladim8r/TASK-1","description":null,"fork":false,"url":"https://api.github.com/repos/Vladim8r/TASK-1","forks_url":"https://api.github.com/repos/Vladim8r/TASK-1/forks","keys_url":"https://api.github.com/repos/Vladim8r/TASK-1/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Vladim8r/TASK-1/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Vladim8r/TASK-1/teams","hooks_url":"https://api.github.com/repos/Vladim8r/TASK-1/hooks","issue_events_url":"https://api.github.com/repos/Vladim8r/TASK-1/issues/events{/number}","events_url":"https://api.github.com/repos/Vladim8r/TASK-1/events","assignees_url":"https://api.github.com/repos/Vladim8r/TASK-1/assignees{/user}","branches_url":"https://api.github.com/repos/Vladim8r/TASK-1/branches{/branch}","tags_url":"https://api.github.com/repos/Vladim8r/TASK-1/tags","blobs_url":"https://api.github.com/repos/Vladim8r/TASK-1/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Vladim8r/TASK-1/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Vladim8r/TASK-1/git/refs{/sha}","trees_url":"https://api.github.com/repos/Vladim8r/TASK-1/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Vladim8r/TASK-1/statuses/{sha}","languages_url":"https://api.github.com/repos/Vladim8r/TASK-1/languages","stargazers_url":"https://api.github.com/repos/Vladim8r/TASK-1/stargazers","contributors_url":"https://api.github.com/repos/Vladim8r/TASK-1/contributors","subscribers_url":"https://api.github.com/repos/Vladim8r/TASK-1/subscribers","subscription_url":"https://api.github.com/repos/Vladim8r/TASK-1/subscription","commits_url":"https://api.github.com/repos/Vladim8r/TASK-1/commits{/sha}","git_commits_url":"https://api.github.com/repos/Vladim8r/TASK-1/git/commits{/sha}","comments_url":"https://api.github.com/repos/Vladim8r/TASK-1/comments{/number}","issue_comment_url":"https://api.github.com/repos/Vladim8r/TASK-1/issues/comments{/number}","contents_url":"https://api.github.com/repos/Vladim8r/TASK-1/contents/{+path}","compare_url":"https://api.github.com/repos/Vladim8r/TASK-1/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Vladim8r/TASK-1/merges","archive_url":"https://api.github.com/repos/Vladim8r/TASK-1/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Vladim8r/TASK-1/downloads","issues_url":"https://api.github.com/repos/Vladim8r/TASK-1/issues{/number}","pulls_url":"https://api.github.com/repos/Vladim8r/TASK-1/pulls{/number}","milestones_url":"https://api.github.com/repos/Vladim8r/TASK-1/milestones{/number}","notifications_url":"https://api.github.com/repos/Vladim8r/TASK-1/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Vladim8r/TASK-1/labels{/name}","releases_url":"https://api.github.com/repos/Vladim8r/TASK-1/releases{/id}","deployments_url":"https://api.github.com/repos/Vladim8r/TASK-1/deployments","created_at":"2018-06-18T07:08:36Z","updated_at":"2018-06-18T07:08:39Z","pushed_at":"2018-06-20T08:42:46Z","git_url":"git://github.com/Vladim8r/TASK-1.git","ssh_url":"git@github.com:Vladim8r/TASK-1.git","clone_url":"https://github.com/Vladim8r/TASK-1.git","svn_url":"https://github.com/Vladim8r/TASK-1","homepage":null,"size":14,"stargazers_count":0,"watchers_count":0,"language":null,"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/Vladim8r/TASK-1/pulls/1"},"html":{"href":"https://github.com/Vladim8r/TASK-1/pull/1"},"issue":{"href":"https://api.github.com/repos/Vladim8r/TASK-1/issues/1"},"comments":{"href":"https://api.github.com/repos/Vladim8r/TASK-1/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/Vladim8r/TASK-1/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/Vladim8r/TASK-1/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Vladim8r/TASK-1/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/Vladim8r/TASK-1/statuses/e8672ce56924dca9426021cdd277e5309325e686"}},"author_association":"OWNER"}}
{"actor":{"display_login":"DYapparov"}}