{"action":"created","comment":{"url":"https://api.github.com/repos/yegor256/takes/pulls/comments/28665655","id":28665655,"diff_hunk":"@@ -0,0 +1,103 @@\n+/**\n+ * The MIT License (MIT)\n+ *\n+ * Copyright (c) 2015 Yegor Bugayenko\n+ *\n+ * Permission is hereby granted, free of charge, to any person obtaining a copy\n+ * of this software and associated documentation files (the \"Software\"), to deal\n+ * in the Software without restriction, including without limitation the rights\n+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n+ * copies of the Software, and to permit persons to whom the Software is\n+ * furnished to do so, subject to the following conditions:\n+ *\n+ * The above copyright notice and this permission notice shall be included\n+ * in all copies or substantial portions of the Software.\n+ *\n+ * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE\n+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n+ * SOFTWARE.\n+ */\n+\n+package org.takes.misc;\n+\n+import lombok.EqualsAndHashCode;\n+\n+/**\n+ * Replacement a nullable T reference with a non-null value.\n+ *\n+ * <p>All implementations of this interface must be immutable and thread-safe.\n+ * @author Dmitry Zaytsev (dmitry.zaytsev@gmail.com)\n+ * @version $Id$\n+ * @since 0.14\n+ */\n+public interface Opt<T> {\n+    /**\n+     * Returns the contained instance.\n+     * @return Instance\n+     */\n+    T get();\n+\n+    /**\n+     * Returns true if contains instance.\n+     * @return True if present\n+     */\n+    boolean has();\n+\n+    /**\n+     * Holder for a single element only.\n+     *\n+     * <p>The class is immutable and thread-safe.\n+     * @author Dmitry Zaytsev (dmitry.zaytsev@gamil.com)\n+     * @version $Id$\n+     * @since 0.14\n+     */\n+    @EqualsAndHashCode(of = \"origin\")\n+    final class Holder<T> implements Opt<T> {","path":"src/main/java/org/takes/misc/Opt.java","position":59,"original_position":59,"commit_id":"efafcfa08771488742111fd69b212385c36442f3","original_commit_id":"efafcfa08771488742111fd69b212385c36442f3","user":{"login":"yegor256","id":526301,"avatar_url":"https://avatars.githubusercontent.com/u/526301?v=3","gravatar_id":"","url":"https://api.github.com/users/yegor256","html_url":"https://github.com/yegor256","followers_url":"https://api.github.com/users/yegor256/followers","following_url":"https://api.github.com/users/yegor256/following{/other_user}","gists_url":"https://api.github.com/users/yegor256/gists{/gist_id}","starred_url":"https://api.github.com/users/yegor256/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yegor256/subscriptions","organizations_url":"https://api.github.com/users/yegor256/orgs","repos_url":"https://api.github.com/users/yegor256/repos","events_url":"https://api.github.com/users/yegor256/events{/privacy}","received_events_url":"https://api.github.com/users/yegor256/received_events","type":"User","site_admin":false},"body":"don't like the name at all :( see http://www.yegor256.com/2015/03/09/objects-end-with-er.html every time you see -er at the end of the name, change it. How about `Single` instead?","created_at":"2015-04-20T06:10:15Z","updated_at":"2015-04-20T06:10:15Z","html_url":"https://github.com/yegor256/takes/pull/188#discussion_r28665655","pull_request_url":"https://api.github.com/repos/yegor256/takes/pulls/188","_links":{"self":{"href":"https://api.github.com/repos/yegor256/takes/pulls/comments/28665655"},"html":{"href":"https://github.com/yegor256/takes/pull/188#discussion_r28665655"},"pull_request":{"href":"https://api.github.com/repos/yegor256/takes/pulls/188"}}},"pull_request":{"url":"https://api.github.com/repos/yegor256/takes/pulls/188","id":33606091,"html_url":"https://github.com/yegor256/takes/pull/188","diff_url":"https://github.com/yegor256/takes/pull/188.diff","patch_url":"https://github.com/yegor256/takes/pull/188.patch","issue_url":"https://api.github.com/repos/yegor256/takes/issues/188","number":188,"state":"open","locked":false,"title":"#187 Iterator is a wrong concept for Fork.route()","user":{"login":"dmzaytsev","id":9972909,"avatar_url":"https://avatars.githubusercontent.com/u/9972909?v=3","gravatar_id":"","url":"https://api.github.com/users/dmzaytsev","html_url":"https://github.com/dmzaytsev","followers_url":"https://api.github.com/users/dmzaytsev/followers","following_url":"https://api.github.com/users/dmzaytsev/following{/other_user}","gists_url":"https://api.github.com/users/dmzaytsev/gists{/gist_id}","starred_url":"https://api.github.com/users/dmzaytsev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmzaytsev/subscriptions","organizations_url":"https://api.github.com/users/dmzaytsev/orgs","repos_url":"https://api.github.com/users/dmzaytsev/repos","events_url":"https://api.github.com/users/dmzaytsev/events{/privacy}","received_events_url":"https://api.github.com/users/dmzaytsev/received_events","type":"User","site_admin":false},"body":"For  #187 \r\n\r\n* created interface Opt \r\n* created decorator Opt.Holder \r\n* created Opt.Empty\r\n* replaced Iterator<> to Opt<> in route()  for all  implementations of Fork\r\n","created_at":"2015-04-18T18:02:46Z","updated_at":"2015-04-20T06:10:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e1f6b5833f9b59e143f483ae31a9eb9c3f638699","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/yegor256/takes/pulls/188/commits","review_comments_url":"https://api.github.com/repos/yegor256/takes/pulls/188/comments","review_comment_url":"https://api.github.com/repos/yegor256/takes/pulls/comments{/number}","comments_url":"https://api.github.com/repos/yegor256/takes/issues/188/comments","statuses_url":"https://api.github.com/repos/yegor256/takes/statuses/efafcfa08771488742111fd69b212385c36442f3","head":{"label":"dmzaytsev:187","ref":"187","sha":"efafcfa08771488742111fd69b212385c36442f3","user":{"login":"dmzaytsev","id":9972909,"avatar_url":"https://avatars.githubusercontent.com/u/9972909?v=3","gravatar_id":"","url":"https://api.github.com/users/dmzaytsev","html_url":"https://github.com/dmzaytsev","followers_url":"https://api.github.com/users/dmzaytsev/followers","following_url":"https://api.github.com/users/dmzaytsev/following{/other_user}","gists_url":"https://api.github.com/users/dmzaytsev/gists{/gist_id}","starred_url":"https://api.github.com/users/dmzaytsev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmzaytsev/subscriptions","organizations_url":"https://api.github.com/users/dmzaytsev/orgs","repos_url":"https://api.github.com/users/dmzaytsev/repos","events_url":"https://api.github.com/users/dmzaytsev/events{/privacy}","received_events_url":"https://api.github.com/users/dmzaytsev/received_events","type":"User","site_admin":false},"repo":{"id":32280149,"name":"takes","full_name":"dmzaytsev/takes","owner":{"login":"dmzaytsev","id":9972909,"avatar_url":"https://avatars.githubusercontent.com/u/9972909?v=3","gravatar_id":"","url":"https://api.github.com/users/dmzaytsev","html_url":"https://github.com/dmzaytsev","followers_url":"https://api.github.com/users/dmzaytsev/followers","following_url":"https://api.github.com/users/dmzaytsev/following{/other_user}","gists_url":"https://api.github.com/users/dmzaytsev/gists{/gist_id}","starred_url":"https://api.github.com/users/dmzaytsev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmzaytsev/subscriptions","organizations_url":"https://api.github.com/users/dmzaytsev/orgs","repos_url":"https://api.github.com/users/dmzaytsev/repos","events_url":"https://api.github.com/users/dmzaytsev/events{/privacy}","received_events_url":"https://api.github.com/users/dmzaytsev/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dmzaytsev/takes","description":"True Object-Oriented and Immutable Java Web Framework","fork":true,"url":"https://api.github.com/repos/dmzaytsev/takes","forks_url":"https://api.github.com/repos/dmzaytsev/takes/forks","keys_url":"https://api.github.com/repos/dmzaytsev/takes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dmzaytsev/takes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dmzaytsev/takes/teams","hooks_url":"https://api.github.com/repos/dmzaytsev/takes/hooks","issue_events_url":"https://api.github.com/repos/dmzaytsev/takes/issues/events{/number}","events_url":"https://api.github.com/repos/dmzaytsev/takes/events","assignees_url":"https://api.github.com/repos/dmzaytsev/takes/assignees{/user}","branches_url":"https://api.github.com/repos/dmzaytsev/takes/branches{/branch}","tags_url":"https://api.github.com/repos/dmzaytsev/takes/tags","blobs_url":"https://api.github.com/repos/dmzaytsev/takes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dmzaytsev/takes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dmzaytsev/takes/git/refs{/sha}","trees_url":"https://api.github.com/repos/dmzaytsev/takes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dmzaytsev/takes/statuses/{sha}","languages_url":"https://api.github.com/repos/dmzaytsev/takes/languages","stargazers_url":"https://api.github.com/repos/dmzaytsev/takes/stargazers","contributors_url":"https://api.github.com/repos/dmzaytsev/takes/contributors","subscribers_url":"https://api.github.com/repos/dmzaytsev/takes/subscribers","subscription_url":"https://api.github.com/repos/dmzaytsev/takes/subscription","commits_url":"https://api.github.com/repos/dmzaytsev/takes/commits{/sha}","git_commits_url":"https://api.github.com/repos/dmzaytsev/takes/git/commits{/sha}","comments_url":"https://api.github.com/repos/dmzaytsev/takes/comments{/number}","issue_comment_url":"https://api.github.com/repos/dmzaytsev/takes/issues/comments{/number}","contents_url":"https://api.github.com/repos/dmzaytsev/takes/contents/{+path}","compare_url":"https://api.github.com/repos/dmzaytsev/takes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dmzaytsev/takes/merges","archive_url":"https://api.github.com/repos/dmzaytsev/takes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dmzaytsev/takes/downloads","issues_url":"https://api.github.com/repos/dmzaytsev/takes/issues{/number}","pulls_url":"https://api.github.com/repos/dmzaytsev/takes/pulls{/number}","milestones_url":"https://api.github.com/repos/dmzaytsev/takes/milestones{/number}","notifications_url":"https://api.github.com/repos/dmzaytsev/takes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dmzaytsev/takes/labels{/name}","releases_url":"https://api.github.com/repos/dmzaytsev/takes/releases{/id}","created_at":"2015-03-15T19:41:55Z","updated_at":"2015-03-15T19:41:58Z","pushed_at":"2015-04-19T16:47:33Z","git_url":"git://github.com/dmzaytsev/takes.git","ssh_url":"git@github.com:dmzaytsev/takes.git","clone_url":"https://github.com/dmzaytsev/takes.git","svn_url":"https://github.com/dmzaytsev/takes","homepage":"http://www.takes.org","size":5108,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"yegor256:master","ref":"master","sha":"77373875f5a7e78c51f3efeebbe319085ae957e7","user":{"login":"yegor256","id":526301,"avatar_url":"https://avatars.githubusercontent.com/u/526301?v=3","gravatar_id":"","url":"https://api.github.com/users/yegor256","html_url":"https://github.com/yegor256","followers_url":"https://api.github.com/users/yegor256/followers","following_url":"https://api.github.com/users/yegor256/following{/other_user}","gists_url":"https://api.github.com/users/yegor256/gists{/gist_id}","starred_url":"https://api.github.com/users/yegor256/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yegor256/subscriptions","organizations_url":"https://api.github.com/users/yegor256/orgs","repos_url":"https://api.github.com/users/yegor256/repos","events_url":"https://api.github.com/users/yegor256/events{/privacy}","received_events_url":"https://api.github.com/users/yegor256/received_events","type":"User","site_admin":false},"repo":{"id":28924109,"name":"takes","full_name":"yegor256/takes","owner":{"login":"yegor256","id":526301,"avatar_url":"https://avatars.githubusercontent.com/u/526301?v=3","gravatar_id":"","url":"https://api.github.com/users/yegor256","html_url":"https://github.com/yegor256","followers_url":"https://api.github.com/users/yegor256/followers","following_url":"https://api.github.com/users/yegor256/following{/other_user}","gists_url":"https://api.github.com/users/yegor256/gists{/gist_id}","starred_url":"https://api.github.com/users/yegor256/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yegor256/subscriptions","organizations_url":"https://api.github.com/users/yegor256/orgs","repos_url":"https://api.github.com/users/yegor256/repos","events_url":"https://api.github.com/users/yegor256/events{/privacy}","received_events_url":"https://api.github.com/users/yegor256/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/yegor256/takes","description":"True Object-Oriented and Immutable Java Web Framework","fork":false,"url":"https://api.github.com/repos/yegor256/takes","forks_url":"https://api.github.com/repos/yegor256/takes/forks","keys_url":"https://api.github.com/repos/yegor256/takes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yegor256/takes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yegor256/takes/teams","hooks_url":"https://api.github.com/repos/yegor256/takes/hooks","issue_events_url":"https://api.github.com/repos/yegor256/takes/issues/events{/number}","events_url":"https://api.github.com/repos/yegor256/takes/events","assignees_url":"https://api.github.com/repos/yegor256/takes/assignees{/user}","branches_url":"https://api.github.com/repos/yegor256/takes/branches{/branch}","tags_url":"https://api.github.com/repos/yegor256/takes/tags","blobs_url":"https://api.github.com/repos/yegor256/takes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yegor256/takes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yegor256/takes/git/refs{/sha}","trees_url":"https://api.github.com/repos/yegor256/takes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yegor256/takes/statuses/{sha}","languages_url":"https://api.github.com/repos/yegor256/takes/languages","stargazers_url":"https://api.github.com/repos/yegor256/takes/stargazers","contributors_url":"https://api.github.com/repos/yegor256/takes/contributors","subscribers_url":"https://api.github.com/repos/yegor256/takes/subscribers","subscription_url":"https://api.github.com/repos/yegor256/takes/subscription","commits_url":"https://api.github.com/repos/yegor256/takes/commits{/sha}","git_commits_url":"https://api.github.com/repos/yegor256/takes/git/commits{/sha}","comments_url":"https://api.github.com/repos/yegor256/takes/comments{/number}","issue_comment_url":"https://api.github.com/repos/yegor256/takes/issues/comments{/number}","contents_url":"https://api.github.com/repos/yegor256/takes/contents/{+path}","compare_url":"https://api.github.com/repos/yegor256/takes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yegor256/takes/merges","archive_url":"https://api.github.com/repos/yegor256/takes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yegor256/takes/downloads","issues_url":"https://api.github.com/repos/yegor256/takes/issues{/number}","pulls_url":"https://api.github.com/repos/yegor256/takes/pulls{/number}","milestones_url":"https://api.github.com/repos/yegor256/takes/milestones{/number}","notifications_url":"https://api.github.com/repos/yegor256/takes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yegor256/takes/labels{/name}","releases_url":"https://api.github.com/repos/yegor256/takes/releases{/id}","created_at":"2015-01-07T16:57:47Z","updated_at":"2015-04-20T01:13:24Z","pushed_at":"2015-04-20T01:32:10Z","git_url":"git://github.com/yegor256/takes.git","ssh_url":"git@github.com:yegor256/takes.git","clone_url":"https://github.com/yegor256/takes.git","svn_url":"https://github.com/yegor256/takes","homepage":"http://www.takes.org","size":22220,"stargazers_count":45,"watchers_count":45,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":21,"mirror_url":null,"open_issues_count":45,"forks":21,"open_issues":45,"watchers":45,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/yegor256/takes/pulls/188"},"html":{"href":"https://github.com/yegor256/takes/pull/188"},"issue":{"href":"https://api.github.com/repos/yegor256/takes/issues/188"},"comments":{"href":"https://api.github.com/repos/yegor256/takes/issues/188/comments"},"review_comments":{"href":"https://api.github.com/repos/yegor256/takes/pulls/188/comments"},"review_comment":{"href":"https://api.github.com/repos/yegor256/takes/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/yegor256/takes/pulls/188/commits"},"statuses":{"href":"https://api.github.com/repos/yegor256/takes/statuses/efafcfa08771488742111fd69b212385c36442f3"}}}}