{"action":"created","comment":{"url":"https://api.github.com/repos/jonjoncronin/java_data_structures/pulls/comments/66740332","id":66740332,"diff_hunk":"@@ -0,0 +1,116 @@\n+/**\n+ * The queue package contains our Queue, QueueTest, QueueNode and QueueTest \n+ * classes.\n+ * \n+ * @author Scott McDonald and Jon Cronin\n+ */\n+package queue;\n+\n+/**\n+ * Queue implements the basic Queue ADT, with the functions enque() and deque().\n+ * Users of this queue class can set the maximum capacity or accept the default\n+ * of 10.\n+ * @author Scott McDonald and Jon Cronin\n+ */\n+public class Queue {\n+    private QueueNode head;\n+    private QueueNode tail;\n+    private int capacity;\n+    private int size;\n+    \n+    // Define the return values the Queue class methods may use\n+    public static final int Q_SUCCESS = 0;\n+    public static final int Q_ERR_NULL = -1;\n+    public static final int Q_ERR_FULL = -2;\n+    \n+    /**\n+     * Default constructor. Sets head and tail to null, max capacity to 10 and\n+     * current size to 0.\n+     */\n+    public Queue() {\n+        head = null;\n+        tail = null;\n+        capacity = 10;\n+        size = 0;\n+    }\n+    \n+    /**\n+     * Alternate constructor that allows caller to set the maximum capacity.\n+     * If capacity is set to a negative value then we will simply let the queue\n+     * grow until the system is out of heap.\n+     * @param capacity \n+     */\n+    public Queue(int capacity) {\n+        this();","path":"src/queue/Queue.java","position":44,"original_position":44,"commit_id":"3b34845c6e0bb705e3b67b226a04ff6286a6c085","original_commit_id":"3b34845c6e0bb705e3b67b226a04ff6286a6c085","user":{"login":"mcdonals","id":7885931,"avatar_url":"https://avatars.githubusercontent.com/u/7885931?v=3","gravatar_id":"","url":"https://api.github.com/users/mcdonals","html_url":"https://github.com/mcdonals","followers_url":"https://api.github.com/users/mcdonals/followers","following_url":"https://api.github.com/users/mcdonals/following{/other_user}","gists_url":"https://api.github.com/users/mcdonals/gists{/gist_id}","starred_url":"https://api.github.com/users/mcdonals/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mcdonals/subscriptions","organizations_url":"https://api.github.com/users/mcdonals/orgs","repos_url":"https://api.github.com/users/mcdonals/repos","events_url":"https://api.github.com/users/mcdonals/events{/privacy}","received_events_url":"https://api.github.com/users/mcdonals/received_events","type":"User","site_admin":false},"body":"that calls the default Queue constructor from the overloaded constructor so you don't have to rewrite all the lines and only have to worry about the differences between the constructor calls. You can do the same thing with inherited classes and their constructors but then you use super() instead of this(). this is shorthand for this object instance, so from the object instance you are accessing the object instance.","created_at":"2016-06-13T05:00:20Z","updated_at":"2016-06-13T05:00:20Z","html_url":"https://github.com/jonjoncronin/java_data_structures/pull/5#discussion_r66740332","pull_request_url":"https://api.github.com/repos/jonjoncronin/java_data_structures/pulls/5","_links":{"self":{"href":"https://api.github.com/repos/jonjoncronin/java_data_structures/pulls/comments/66740332"},"html":{"href":"https://github.com/jonjoncronin/java_data_structures/pull/5#discussion_r66740332"},"pull_request":{"href":"https://api.github.com/repos/jonjoncronin/java_data_structures/pulls/5"}}},"pull_request":{"url":"https://api.github.com/repos/jonjoncronin/java_data_structures/pulls/5","id":73500707,"html_url":"https://github.com/jonjoncronin/java_data_structures/pull/5","diff_url":"https://github.com/jonjoncronin/java_data_structures/pull/5.diff","patch_url":"https://github.com/jonjoncronin/java_data_structures/pull/5.patch","issue_url":"https://api.github.com/repos/jonjoncronin/java_data_structures/issues/5","number":5,"state":"open","locked":false,"title":"Dev Queue pull request to master","user":{"login":"mcdonals","id":7885931,"avatar_url":"https://avatars.githubusercontent.com/u/7885931?v=3","gravatar_id":"","url":"https://api.github.com/users/mcdonals","html_url":"https://github.com/mcdonals","followers_url":"https://api.github.com/users/mcdonals/followers","following_url":"https://api.github.com/users/mcdonals/following{/other_user}","gists_url":"https://api.github.com/users/mcdonals/gists{/gist_id}","starred_url":"https://api.github.com/users/mcdonals/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mcdonals/subscriptions","organizations_url":"https://api.github.com/users/mcdonals/orgs","repos_url":"https://api.github.com/users/mcdonals/repos","events_url":"https://api.github.com/users/mcdonals/events{/privacy}","received_events_url":"https://api.github.com/users/mcdonals/received_events","type":"User","site_admin":false},"body":"Pull request to merge dev_queue into master. At this point Queue supports enque(), deque() and a max capacity. The QueueNode class supports the generic type signature for it's elements. \r\n\r\nJUnit classes created for both Queue class and QueueNode class and they provide 100% code coverage.","created_at":"2016-06-12T16:38:48Z","updated_at":"2016-06-13T05:00:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"42811f5a8e9204eeba41c91588770ee78627c9c8","assignee":{"login":"mcdonals","id":7885931,"avatar_url":"https://avatars.githubusercontent.com/u/7885931?v=3","gravatar_id":"","url":"https://api.github.com/users/mcdonals","html_url":"https://github.com/mcdonals","followers_url":"https://api.github.com/users/mcdonals/followers","following_url":"https://api.github.com/users/mcdonals/following{/other_user}","gists_url":"https://api.github.com/users/mcdonals/gists{/gist_id}","starred_url":"https://api.github.com/users/mcdonals/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mcdonals/subscriptions","organizations_url":"https://api.github.com/users/mcdonals/orgs","repos_url":"https://api.github.com/users/mcdonals/repos","events_url":"https://api.github.com/users/mcdonals/events{/privacy}","received_events_url":"https://api.github.com/users/mcdonals/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/jonjoncronin/java_data_structures/pulls/5/commits","review_comments_url":"https://api.github.com/repos/jonjoncronin/java_data_structures/pulls/5/comments","review_comment_url":"https://api.github.com/repos/jonjoncronin/java_data_structures/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jonjoncronin/java_data_structures/issues/5/comments","statuses_url":"https://api.github.com/repos/jonjoncronin/java_data_structures/statuses/3b34845c6e0bb705e3b67b226a04ff6286a6c085","head":{"label":"jonjoncronin:dev_queue","ref":"dev_queue","sha":"3b34845c6e0bb705e3b67b226a04ff6286a6c085","user":{"login":"jonjoncronin","id":17092169,"avatar_url":"https://avatars.githubusercontent.com/u/17092169?v=3","gravatar_id":"","url":"https://api.github.com/users/jonjoncronin","html_url":"https://github.com/jonjoncronin","followers_url":"https://api.github.com/users/jonjoncronin/followers","following_url":"https://api.github.com/users/jonjoncronin/following{/other_user}","gists_url":"https://api.github.com/users/jonjoncronin/gists{/gist_id}","starred_url":"https://api.github.com/users/jonjoncronin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonjoncronin/subscriptions","organizations_url":"https://api.github.com/users/jonjoncronin/orgs","repos_url":"https://api.github.com/users/jonjoncronin/repos","events_url":"https://api.github.com/users/jonjoncronin/events{/privacy}","received_events_url":"https://api.github.com/users/jonjoncronin/received_events","type":"User","site_admin":false},"repo":{"id":60668587,"name":"java_data_structures","full_name":"jonjoncronin/java_data_structures","owner":{"login":"jonjoncronin","id":17092169,"avatar_url":"https://avatars.githubusercontent.com/u/17092169?v=3","gravatar_id":"","url":"https://api.github.com/users/jonjoncronin","html_url":"https://github.com/jonjoncronin","followers_url":"https://api.github.com/users/jonjoncronin/followers","following_url":"https://api.github.com/users/jonjoncronin/following{/other_user}","gists_url":"https://api.github.com/users/jonjoncronin/gists{/gist_id}","starred_url":"https://api.github.com/users/jonjoncronin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonjoncronin/subscriptions","organizations_url":"https://api.github.com/users/jonjoncronin/orgs","repos_url":"https://api.github.com/users/jonjoncronin/repos","events_url":"https://api.github.com/users/jonjoncronin/events{/privacy}","received_events_url":"https://api.github.com/users/jonjoncronin/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jonjoncronin/java_data_structures","description":"","fork":false,"url":"https://api.github.com/repos/jonjoncronin/java_data_structures","forks_url":"https://api.github.com/repos/jonjoncronin/java_data_structures/forks","keys_url":"https://api.github.com/repos/jonjoncronin/java_data_structures/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jonjoncronin/java_data_structures/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jonjoncronin/java_data_structures/teams","hooks_url":"https://api.github.com/repos/jonjoncronin/java_data_structures/hooks","issue_events_url":"https://api.github.com/repos/jonjoncronin/java_data_structures/issues/events{/number}","events_url":"https://api.github.com/repos/jonjoncronin/java_data_structures/events","assignees_url":"https://api.github.com/repos/jonjoncronin/java_data_structures/assignees{/user}","branches_url":"https://api.github.com/repos/jonjoncronin/java_data_structures/branches{/branch}","tags_url":"https://api.github.com/repos/jonjoncronin/java_data_structures/tags","blobs_url":"https://api.github.com/repos/jonjoncronin/java_data_structures/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jonjoncronin/java_data_structures/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jonjoncronin/java_data_structures/git/refs{/sha}","trees_url":"https://api.github.com/repos/jonjoncronin/java_data_structures/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jonjoncronin/java_data_structures/statuses/{sha}","languages_url":"https://api.github.com/repos/jonjoncronin/java_data_structures/languages","stargazers_url":"https://api.github.com/repos/jonjoncronin/java_data_structures/stargazers","contributors_url":"https://api.github.com/repos/jonjoncronin/java_data_structures/contributors","subscribers_url":"https://api.github.com/repos/jonjoncronin/java_data_structures/subscribers","subscription_url":"https://api.github.com/repos/jonjoncronin/java_data_structures/subscription","commits_url":"https://api.github.com/repos/jonjoncronin/java_data_structures/commits{/sha}","git_commits_url":"https://api.github.com/repos/jonjoncronin/java_data_structures/git/commits{/sha}","comments_url":"https://api.github.com/repos/jonjoncronin/java_data_structures/comments{/number}","issue_comment_url":"https://api.github.com/repos/jonjoncronin/java_data_structures/issues/comments{/number}","contents_url":"https://api.github.com/repos/jonjoncronin/java_data_structures/contents/{+path}","compare_url":"https://api.github.com/repos/jonjoncronin/java_data_structures/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jonjoncronin/java_data_structures/merges","archive_url":"https://api.github.com/repos/jonjoncronin/java_data_structures/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jonjoncronin/java_data_structures/downloads","issues_url":"https://api.github.com/repos/jonjoncronin/java_data_structures/issues{/number}","pulls_url":"https://api.github.com/repos/jonjoncronin/java_data_structures/pulls{/number}","milestones_url":"https://api.github.com/repos/jonjoncronin/java_data_structures/milestones{/number}","notifications_url":"https://api.github.com/repos/jonjoncronin/java_data_structures/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jonjoncronin/java_data_structures/labels{/name}","releases_url":"https://api.github.com/repos/jonjoncronin/java_data_structures/releases{/id}","deployments_url":"https://api.github.com/repos/jonjoncronin/java_data_structures/deployments","created_at":"2016-06-08T04:36:12Z","updated_at":"2016-06-08T04:49:30Z","pushed_at":"2016-06-12T16:38:50Z","git_url":"git://github.com/jonjoncronin/java_data_structures.git","ssh_url":"git@github.com:jonjoncronin/java_data_structures.git","clone_url":"https://github.com/jonjoncronin/java_data_structures.git","svn_url":"https://github.com/jonjoncronin/java_data_structures","homepage":null,"size":32,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"jonjoncronin:master","ref":"master","sha":"fa93f45cc6cc108c9c76ceff18760288bf64aaff","user":{"login":"jonjoncronin","id":17092169,"avatar_url":"https://avatars.githubusercontent.com/u/17092169?v=3","gravatar_id":"","url":"https://api.github.com/users/jonjoncronin","html_url":"https://github.com/jonjoncronin","followers_url":"https://api.github.com/users/jonjoncronin/followers","following_url":"https://api.github.com/users/jonjoncronin/following{/other_user}","gists_url":"https://api.github.com/users/jonjoncronin/gists{/gist_id}","starred_url":"https://api.github.com/users/jonjoncronin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonjoncronin/subscriptions","organizations_url":"https://api.github.com/users/jonjoncronin/orgs","repos_url":"https://api.github.com/users/jonjoncronin/repos","events_url":"https://api.github.com/users/jonjoncronin/events{/privacy}","received_events_url":"https://api.github.com/users/jonjoncronin/received_events","type":"User","site_admin":false},"repo":{"id":60668587,"name":"java_data_structures","full_name":"jonjoncronin/java_data_structures","owner":{"login":"jonjoncronin","id":17092169,"avatar_url":"https://avatars.githubusercontent.com/u/17092169?v=3","gravatar_id":"","url":"https://api.github.com/users/jonjoncronin","html_url":"https://github.com/jonjoncronin","followers_url":"https://api.github.com/users/jonjoncronin/followers","following_url":"https://api.github.com/users/jonjoncronin/following{/other_user}","gists_url":"https://api.github.com/users/jonjoncronin/gists{/gist_id}","starred_url":"https://api.github.com/users/jonjoncronin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonjoncronin/subscriptions","organizations_url":"https://api.github.com/users/jonjoncronin/orgs","repos_url":"https://api.github.com/users/jonjoncronin/repos","events_url":"https://api.github.com/users/jonjoncronin/events{/privacy}","received_events_url":"https://api.github.com/users/jonjoncronin/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jonjoncronin/java_data_structures","description":"","fork":false,"url":"https://api.github.com/repos/jonjoncronin/java_data_structures","forks_url":"https://api.github.com/repos/jonjoncronin/java_data_structures/forks","keys_url":"https://api.github.com/repos/jonjoncronin/java_data_structures/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jonjoncronin/java_data_structures/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jonjoncronin/java_data_structures/teams","hooks_url":"https://api.github.com/repos/jonjoncronin/java_data_structures/hooks","issue_events_url":"https://api.github.com/repos/jonjoncronin/java_data_structures/issues/events{/number}","events_url":"https://api.github.com/repos/jonjoncronin/java_data_structures/events","assignees_url":"https://api.github.com/repos/jonjoncronin/java_data_structures/assignees{/user}","branches_url":"https://api.github.com/repos/jonjoncronin/java_data_structures/branches{/branch}","tags_url":"https://api.github.com/repos/jonjoncronin/java_data_structures/tags","blobs_url":"https://api.github.com/repos/jonjoncronin/java_data_structures/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jonjoncronin/java_data_structures/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jonjoncronin/java_data_structures/git/refs{/sha}","trees_url":"https://api.github.com/repos/jonjoncronin/java_data_structures/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jonjoncronin/java_data_structures/statuses/{sha}","languages_url":"https://api.github.com/repos/jonjoncronin/java_data_structures/languages","stargazers_url":"https://api.github.com/repos/jonjoncronin/java_data_structures/stargazers","contributors_url":"https://api.github.com/repos/jonjoncronin/java_data_structures/contributors","subscribers_url":"https://api.github.com/repos/jonjoncronin/java_data_structures/subscribers","subscription_url":"https://api.github.com/repos/jonjoncronin/java_data_structures/subscription","commits_url":"https://api.github.com/repos/jonjoncronin/java_data_structures/commits{/sha}","git_commits_url":"https://api.github.com/repos/jonjoncronin/java_data_structures/git/commits{/sha}","comments_url":"https://api.github.com/repos/jonjoncronin/java_data_structures/comments{/number}","issue_comment_url":"https://api.github.com/repos/jonjoncronin/java_data_structures/issues/comments{/number}","contents_url":"https://api.github.com/repos/jonjoncronin/java_data_structures/contents/{+path}","compare_url":"https://api.github.com/repos/jonjoncronin/java_data_structures/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jonjoncronin/java_data_structures/merges","archive_url":"https://api.github.com/repos/jonjoncronin/java_data_structures/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jonjoncronin/java_data_structures/downloads","issues_url":"https://api.github.com/repos/jonjoncronin/java_data_structures/issues{/number}","pulls_url":"https://api.github.com/repos/jonjoncronin/java_data_structures/pulls{/number}","milestones_url":"https://api.github.com/repos/jonjoncronin/java_data_structures/milestones{/number}","notifications_url":"https://api.github.com/repos/jonjoncronin/java_data_structures/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jonjoncronin/java_data_structures/labels{/name}","releases_url":"https://api.github.com/repos/jonjoncronin/java_data_structures/releases{/id}","deployments_url":"https://api.github.com/repos/jonjoncronin/java_data_structures/deployments","created_at":"2016-06-08T04:36:12Z","updated_at":"2016-06-08T04:49:30Z","pushed_at":"2016-06-12T16:38:50Z","git_url":"git://github.com/jonjoncronin/java_data_structures.git","ssh_url":"git@github.com:jonjoncronin/java_data_structures.git","clone_url":"https://github.com/jonjoncronin/java_data_structures.git","svn_url":"https://github.com/jonjoncronin/java_data_structures","homepage":null,"size":32,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jonjoncronin/java_data_structures/pulls/5"},"html":{"href":"https://github.com/jonjoncronin/java_data_structures/pull/5"},"issue":{"href":"https://api.github.com/repos/jonjoncronin/java_data_structures/issues/5"},"comments":{"href":"https://api.github.com/repos/jonjoncronin/java_data_structures/issues/5/comments"},"review_comments":{"href":"https://api.github.com/repos/jonjoncronin/java_data_structures/pulls/5/comments"},"review_comment":{"href":"https://api.github.com/repos/jonjoncronin/java_data_structures/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jonjoncronin/java_data_structures/pulls/5/commits"},"statuses":{"href":"https://api.github.com/repos/jonjoncronin/java_data_structures/statuses/3b34845c6e0bb705e3b67b226a04ff6286a6c085"}}}}
{"actor":{"display_login":"mcdonals"}}