{"action":"created","comment":{"url":"https://api.github.com/repos/AnastasiyaPesto/Java_pestovnikova_homeWorks/pulls/comments/156596231","pull_request_review_id":82485137,"id":156596231,"diff_hunk":"@@ -1,8 +1,73 @@\n package ru.pestovnikova.Lesson7;\n \n-import java.util.Collection;\n+public class MyStack<T> implements MyCollection {\n \n-public interface MyStack<T> extends Collection<T> {\n-    boolean push(T value);\n-    T pop();\n+    class StackElement {\n+        // ссылка на следующий элемент списка\n+        StackElement next;\n+        // значение\n+        T value;\n+        StackElement(T value) {\n+            this.value = value;\n+        }\n+    }\n+    private StackElement head;\n+    private int realSize;\n+\n+    public MyStack(){ this.realSize = 0; }\n+\n+    public boolean push(T value) {\n+        StackElement elemStack = new StackElement(value);\n+        if(head == null){\n+            head = elemStack;\n+            head.next = null;\n+            realSize++;","path":"src/ru/pestovnikova/Lesson7/MyStack.java","position":24,"original_position":28,"commit_id":"a39322fed317190a2605e586e9e727ff2dffdc2f","original_commit_id":"a39322fed317190a2605e586e9e727ff2dffdc2f","user":{"login":"Shagbark","id":10244483,"avatar_url":"https://avatars2.githubusercontent.com/u/10244483?v=4","gravatar_id":"","url":"https://api.github.com/users/Shagbark","html_url":"https://github.com/Shagbark","followers_url":"https://api.github.com/users/Shagbark/followers","following_url":"https://api.github.com/users/Shagbark/following{/other_user}","gists_url":"https://api.github.com/users/Shagbark/gists{/gist_id}","starred_url":"https://api.github.com/users/Shagbark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Shagbark/subscriptions","organizations_url":"https://api.github.com/users/Shagbark/orgs","repos_url":"https://api.github.com/users/Shagbark/repos","events_url":"https://api.github.com/users/Shagbark/events{/privacy}","received_events_url":"https://api.github.com/users/Shagbark/received_events","type":"User","site_admin":false},"body":"realSize++ можно вынести за пределы if..else","created_at":"2017-12-13T09:01:41Z","updated_at":"2017-12-13T09:02:00Z","html_url":"https://github.com/AnastasiyaPesto/Java_pestovnikova_homeWorks/pull/3#discussion_r156596231","pull_request_url":"https://api.github.com/repos/AnastasiyaPesto/Java_pestovnikova_homeWorks/pulls/3","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/AnastasiyaPesto/Java_pestovnikova_homeWorks/pulls/comments/156596231"},"html":{"href":"https://github.com/AnastasiyaPesto/Java_pestovnikova_homeWorks/pull/3#discussion_r156596231"},"pull_request":{"href":"https://api.github.com/repos/AnastasiyaPesto/Java_pestovnikova_homeWorks/pulls/3"}}},"pull_request":{"url":"https://api.github.com/repos/AnastasiyaPesto/Java_pestovnikova_homeWorks/pulls/3","id":157447096,"html_url":"https://github.com/AnastasiyaPesto/Java_pestovnikova_homeWorks/pull/3","diff_url":"https://github.com/AnastasiyaPesto/Java_pestovnikova_homeWorks/pull/3.diff","patch_url":"https://github.com/AnastasiyaPesto/Java_pestovnikova_homeWorks/pull/3.patch","issue_url":"https://api.github.com/repos/AnastasiyaPesto/Java_pestovnikova_homeWorks/issues/3","number":3,"state":"open","locked":false,"title":"Lesson7","user":{"login":"AnastasiyaPesto","id":33910431,"avatar_url":"https://avatars1.githubusercontent.com/u/33910431?v=4","gravatar_id":"","url":"https://api.github.com/users/AnastasiyaPesto","html_url":"https://github.com/AnastasiyaPesto","followers_url":"https://api.github.com/users/AnastasiyaPesto/followers","following_url":"https://api.github.com/users/AnastasiyaPesto/following{/other_user}","gists_url":"https://api.github.com/users/AnastasiyaPesto/gists{/gist_id}","starred_url":"https://api.github.com/users/AnastasiyaPesto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AnastasiyaPesto/subscriptions","organizations_url":"https://api.github.com/users/AnastasiyaPesto/orgs","repos_url":"https://api.github.com/users/AnastasiyaPesto/repos","events_url":"https://api.github.com/users/AnastasiyaPesto/events{/privacy}","received_events_url":"https://api.github.com/users/AnastasiyaPesto/received_events","type":"User","site_admin":false},"body":"","created_at":"2017-12-10T19:56:43Z","updated_at":"2017-12-13T09:02:00Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e41978c7751f90c847a044f5356bbabdf7bd69b9","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/AnastasiyaPesto/Java_pestovnikova_homeWorks/pulls/3/commits","review_comments_url":"https://api.github.com/repos/AnastasiyaPesto/Java_pestovnikova_homeWorks/pulls/3/comments","review_comment_url":"https://api.github.com/repos/AnastasiyaPesto/Java_pestovnikova_homeWorks/pulls/comments{/number}","comments_url":"https://api.github.com/repos/AnastasiyaPesto/Java_pestovnikova_homeWorks/issues/3/comments","statuses_url":"https://api.github.com/repos/AnastasiyaPesto/Java_pestovnikova_homeWorks/statuses/a39322fed317190a2605e586e9e727ff2dffdc2f","head":{"label":"AnastasiyaPesto:lesson7","ref":"lesson7","sha":"a39322fed317190a2605e586e9e727ff2dffdc2f","user":{"login":"AnastasiyaPesto","id":33910431,"avatar_url":"https://avatars1.githubusercontent.com/u/33910431?v=4","gravatar_id":"","url":"https://api.github.com/users/AnastasiyaPesto","html_url":"https://github.com/AnastasiyaPesto","followers_url":"https://api.github.com/users/AnastasiyaPesto/followers","following_url":"https://api.github.com/users/AnastasiyaPesto/following{/other_user}","gists_url":"https://api.github.com/users/AnastasiyaPesto/gists{/gist_id}","starred_url":"https://api.github.com/users/AnastasiyaPesto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AnastasiyaPesto/subscriptions","organizations_url":"https://api.github.com/users/AnastasiyaPesto/orgs","repos_url":"https://api.github.com/users/AnastasiyaPesto/repos","events_url":"https://api.github.com/users/AnastasiyaPesto/events{/privacy}","received_events_url":"https://api.github.com/users/AnastasiyaPesto/received_events","type":"User","site_admin":false},"repo":{"id":111997754,"name":"Java_pestovnikova_homeWorks","full_name":"AnastasiyaPesto/Java_pestovnikova_homeWorks","owner":{"login":"AnastasiyaPesto","id":33910431,"avatar_url":"https://avatars1.githubusercontent.com/u/33910431?v=4","gravatar_id":"","url":"https://api.github.com/users/AnastasiyaPesto","html_url":"https://github.com/AnastasiyaPesto","followers_url":"https://api.github.com/users/AnastasiyaPesto/followers","following_url":"https://api.github.com/users/AnastasiyaPesto/following{/other_user}","gists_url":"https://api.github.com/users/AnastasiyaPesto/gists{/gist_id}","starred_url":"https://api.github.com/users/AnastasiyaPesto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AnastasiyaPesto/subscriptions","organizations_url":"https://api.github.com/users/AnastasiyaPesto/orgs","repos_url":"https://api.github.com/users/AnastasiyaPesto/repos","events_url":"https://api.github.com/users/AnastasiyaPesto/events{/privacy}","received_events_url":"https://api.github.com/users/AnastasiyaPesto/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/AnastasiyaPesto/Java_pestovnikova_homeWorks","description":null,"fork":false,"url":"https://api.github.com/repos/AnastasiyaPesto/Java_pestovnikova_homeWorks","forks_url":"https://api.github.com/repos/AnastasiyaPesto/Java_pestovnikova_homeWorks/forks","keys_url":"https://api.github.com/repos/AnastasiyaPesto/Java_pestovnikova_homeWorks/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AnastasiyaPesto/Java_pestovnikova_homeWorks/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AnastasiyaPesto/Java_pestovnikova_homeWorks/teams","hooks_url":"https://api.github.com/repos/AnastasiyaPesto/Java_pestovnikova_homeWorks/hooks","issue_events_url":"https://api.github.com/repos/AnastasiyaPesto/Java_pestovnikova_homeWorks/issues/events{/number}","events_url":"https://api.github.com/repos/AnastasiyaPesto/Java_pestovnikova_homeWorks/events","assignees_url":"https://api.github.com/repos/AnastasiyaPesto/Java_pestovnikova_homeWorks/assignees{/user}","branches_url":"https://api.github.com/repos/AnastasiyaPesto/Java_pestovnikova_homeWorks/branches{/branch}","tags_url":"https://api.github.com/repos/AnastasiyaPesto/Java_pestovnikova_homeWorks/tags","blobs_url":"https://api.github.com/repos/AnastasiyaPesto/Java_pestovnikova_homeWorks/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AnastasiyaPesto/Java_pestovnikova_homeWorks/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AnastasiyaPesto/Java_pestovnikova_homeWorks/git/refs{/sha}","trees_url":"https://api.github.com/repos/AnastasiyaPesto/Java_pestovnikova_homeWorks/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AnastasiyaPesto/Java_pestovnikova_homeWorks/statuses/{sha}","languages_url":"https://api.github.com/repos/AnastasiyaPesto/Java_pestovnikova_homeWorks/languages","stargazers_url":"https://api.github.com/repos/AnastasiyaPesto/Java_pestovnikova_homeWorks/stargazers","contributors_url":"https://api.github.com/repos/AnastasiyaPesto/Java_pestovnikova_homeWorks/contributors","subscribers_url":"https://api.github.com/repos/AnastasiyaPesto/Java_pestovnikova_homeWorks/subscribers","subscription_url":"https://api.github.com/repos/AnastasiyaPesto/Java_pestovnikova_homeWorks/subscription","commits_url":"https://api.github.com/repos/AnastasiyaPesto/Java_pestovnikova_homeWorks/commits{/sha}","git_commits_url":"https://api.github.com/repos/AnastasiyaPesto/Java_pestovnikova_homeWorks/git/commits{/sha}","comments_url":"https://api.github.com/repos/AnastasiyaPesto/Java_pestovnikova_homeWorks/comments{/number}","issue_comment_url":"https://api.github.com/repos/AnastasiyaPesto/Java_pestovnikova_homeWorks/issues/comments{/number}","contents_url":"https://api.github.com/repos/AnastasiyaPesto/Java_pestovnikova_homeWorks/contents/{+path}","compare_url":"https://api.github.com/repos/AnastasiyaPesto/Java_pestovnikova_homeWorks/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AnastasiyaPesto/Java_pestovnikova_homeWorks/merges","archive_url":"https://api.github.com/repos/AnastasiyaPesto/Java_pestovnikova_homeWorks/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AnastasiyaPesto/Java_pestovnikova_homeWorks/downloads","issues_url":"https://api.github.com/repos/AnastasiyaPesto/Java_pestovnikova_homeWorks/issues{/number}","pulls_url":"https://api.github.com/repos/AnastasiyaPesto/Java_pestovnikova_homeWorks/pulls{/number}","milestones_url":"https://api.github.com/repos/AnastasiyaPesto/Java_pestovnikova_homeWorks/milestones{/number}","notifications_url":"https://api.github.com/repos/AnastasiyaPesto/Java_pestovnikova_homeWorks/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AnastasiyaPesto/Java_pestovnikova_homeWorks/labels{/name}","releases_url":"https://api.github.com/repos/AnastasiyaPesto/Java_pestovnikova_homeWorks/releases{/id}","deployments_url":"https://api.github.com/repos/AnastasiyaPesto/Java_pestovnikova_homeWorks/deployments","created_at":"2017-11-25T11:17:35Z","updated_at":"2017-11-25T11:18:19Z","pushed_at":"2017-12-12T20:44:53Z","git_url":"git://github.com/AnastasiyaPesto/Java_pestovnikova_homeWorks.git","ssh_url":"git@github.com:AnastasiyaPesto/Java_pestovnikova_homeWorks.git","clone_url":"https://github.com/AnastasiyaPesto/Java_pestovnikova_homeWorks.git","svn_url":"https://github.com/AnastasiyaPesto/Java_pestovnikova_homeWorks","homepage":null,"size":28,"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":3,"license":null,"forks":0,"open_issues":3,"watchers":0,"default_branch":"master"}},"base":{"label":"AnastasiyaPesto:master","ref":"master","sha":"04f6b3c8927e38d5a977ae60b48527ba8743287e","user":{"login":"AnastasiyaPesto","id":33910431,"avatar_url":"https://avatars1.githubusercontent.com/u/33910431?v=4","gravatar_id":"","url":"https://api.github.com/users/AnastasiyaPesto","html_url":"https://github.com/AnastasiyaPesto","followers_url":"https://api.github.com/users/AnastasiyaPesto/followers","following_url":"https://api.github.com/users/AnastasiyaPesto/following{/other_user}","gists_url":"https://api.github.com/users/AnastasiyaPesto/gists{/gist_id}","starred_url":"https://api.github.com/users/AnastasiyaPesto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AnastasiyaPesto/subscriptions","organizations_url":"https://api.github.com/users/AnastasiyaPesto/orgs","repos_url":"https://api.github.com/users/AnastasiyaPesto/repos","events_url":"https://api.github.com/users/AnastasiyaPesto/events{/privacy}","received_events_url":"https://api.github.com/users/AnastasiyaPesto/received_events","type":"User","site_admin":false},"repo":{"id":111997754,"name":"Java_pestovnikova_homeWorks","full_name":"AnastasiyaPesto/Java_pestovnikova_homeWorks","owner":{"login":"AnastasiyaPesto","id":33910431,"avatar_url":"https://avatars1.githubusercontent.com/u/33910431?v=4","gravatar_id":"","url":"https://api.github.com/users/AnastasiyaPesto","html_url":"https://github.com/AnastasiyaPesto","followers_url":"https://api.github.com/users/AnastasiyaPesto/followers","following_url":"https://api.github.com/users/AnastasiyaPesto/following{/other_user}","gists_url":"https://api.github.com/users/AnastasiyaPesto/gists{/gist_id}","starred_url":"https://api.github.com/users/AnastasiyaPesto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AnastasiyaPesto/subscriptions","organizations_url":"https://api.github.com/users/AnastasiyaPesto/orgs","repos_url":"https://api.github.com/users/AnastasiyaPesto/repos","events_url":"https://api.github.com/users/AnastasiyaPesto/events{/privacy}","received_events_url":"https://api.github.com/users/AnastasiyaPesto/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/AnastasiyaPesto/Java_pestovnikova_homeWorks","description":null,"fork":false,"url":"https://api.github.com/repos/AnastasiyaPesto/Java_pestovnikova_homeWorks","forks_url":"https://api.github.com/repos/AnastasiyaPesto/Java_pestovnikova_homeWorks/forks","keys_url":"https://api.github.com/repos/AnastasiyaPesto/Java_pestovnikova_homeWorks/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AnastasiyaPesto/Java_pestovnikova_homeWorks/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AnastasiyaPesto/Java_pestovnikova_homeWorks/teams","hooks_url":"https://api.github.com/repos/AnastasiyaPesto/Java_pestovnikova_homeWorks/hooks","issue_events_url":"https://api.github.com/repos/AnastasiyaPesto/Java_pestovnikova_homeWorks/issues/events{/number}","events_url":"https://api.github.com/repos/AnastasiyaPesto/Java_pestovnikova_homeWorks/events","assignees_url":"https://api.github.com/repos/AnastasiyaPesto/Java_pestovnikova_homeWorks/assignees{/user}","branches_url":"https://api.github.com/repos/AnastasiyaPesto/Java_pestovnikova_homeWorks/branches{/branch}","tags_url":"https://api.github.com/repos/AnastasiyaPesto/Java_pestovnikova_homeWorks/tags","blobs_url":"https://api.github.com/repos/AnastasiyaPesto/Java_pestovnikova_homeWorks/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AnastasiyaPesto/Java_pestovnikova_homeWorks/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AnastasiyaPesto/Java_pestovnikova_homeWorks/git/refs{/sha}","trees_url":"https://api.github.com/repos/AnastasiyaPesto/Java_pestovnikova_homeWorks/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AnastasiyaPesto/Java_pestovnikova_homeWorks/statuses/{sha}","languages_url":"https://api.github.com/repos/AnastasiyaPesto/Java_pestovnikova_homeWorks/languages","stargazers_url":"https://api.github.com/repos/AnastasiyaPesto/Java_pestovnikova_homeWorks/stargazers","contributors_url":"https://api.github.com/repos/AnastasiyaPesto/Java_pestovnikova_homeWorks/contributors","subscribers_url":"https://api.github.com/repos/AnastasiyaPesto/Java_pestovnikova_homeWorks/subscribers","subscription_url":"https://api.github.com/repos/AnastasiyaPesto/Java_pestovnikova_homeWorks/subscription","commits_url":"https://api.github.com/repos/AnastasiyaPesto/Java_pestovnikova_homeWorks/commits{/sha}","git_commits_url":"https://api.github.com/repos/AnastasiyaPesto/Java_pestovnikova_homeWorks/git/commits{/sha}","comments_url":"https://api.github.com/repos/AnastasiyaPesto/Java_pestovnikova_homeWorks/comments{/number}","issue_comment_url":"https://api.github.com/repos/AnastasiyaPesto/Java_pestovnikova_homeWorks/issues/comments{/number}","contents_url":"https://api.github.com/repos/AnastasiyaPesto/Java_pestovnikova_homeWorks/contents/{+path}","compare_url":"https://api.github.com/repos/AnastasiyaPesto/Java_pestovnikova_homeWorks/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AnastasiyaPesto/Java_pestovnikova_homeWorks/merges","archive_url":"https://api.github.com/repos/AnastasiyaPesto/Java_pestovnikova_homeWorks/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AnastasiyaPesto/Java_pestovnikova_homeWorks/downloads","issues_url":"https://api.github.com/repos/AnastasiyaPesto/Java_pestovnikova_homeWorks/issues{/number}","pulls_url":"https://api.github.com/repos/AnastasiyaPesto/Java_pestovnikova_homeWorks/pulls{/number}","milestones_url":"https://api.github.com/repos/AnastasiyaPesto/Java_pestovnikova_homeWorks/milestones{/number}","notifications_url":"https://api.github.com/repos/AnastasiyaPesto/Java_pestovnikova_homeWorks/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AnastasiyaPesto/Java_pestovnikova_homeWorks/labels{/name}","releases_url":"https://api.github.com/repos/AnastasiyaPesto/Java_pestovnikova_homeWorks/releases{/id}","deployments_url":"https://api.github.com/repos/AnastasiyaPesto/Java_pestovnikova_homeWorks/deployments","created_at":"2017-11-25T11:17:35Z","updated_at":"2017-11-25T11:18:19Z","pushed_at":"2017-12-12T20:44:53Z","git_url":"git://github.com/AnastasiyaPesto/Java_pestovnikova_homeWorks.git","ssh_url":"git@github.com:AnastasiyaPesto/Java_pestovnikova_homeWorks.git","clone_url":"https://github.com/AnastasiyaPesto/Java_pestovnikova_homeWorks.git","svn_url":"https://github.com/AnastasiyaPesto/Java_pestovnikova_homeWorks","homepage":null,"size":28,"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":3,"license":null,"forks":0,"open_issues":3,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/AnastasiyaPesto/Java_pestovnikova_homeWorks/pulls/3"},"html":{"href":"https://github.com/AnastasiyaPesto/Java_pestovnikova_homeWorks/pull/3"},"issue":{"href":"https://api.github.com/repos/AnastasiyaPesto/Java_pestovnikova_homeWorks/issues/3"},"comments":{"href":"https://api.github.com/repos/AnastasiyaPesto/Java_pestovnikova_homeWorks/issues/3/comments"},"review_comments":{"href":"https://api.github.com/repos/AnastasiyaPesto/Java_pestovnikova_homeWorks/pulls/3/comments"},"review_comment":{"href":"https://api.github.com/repos/AnastasiyaPesto/Java_pestovnikova_homeWorks/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/AnastasiyaPesto/Java_pestovnikova_homeWorks/pulls/3/commits"},"statuses":{"href":"https://api.github.com/repos/AnastasiyaPesto/Java_pestovnikova_homeWorks/statuses/a39322fed317190a2605e586e9e727ff2dffdc2f"}},"author_association":"OWNER"}}
{"actor":{"display_login":"Shagbark"}}