{"action":"created","comment":{"url":"https://api.github.com/repos/socialedge/vega/pulls/comments/92124210","pull_request_review_id":12632303,"id":92124210,"diff_hunk":"@@ -0,0 +1,63 @@\n+/**\n+ * SocialEdge Vega - An Electronic Transit Fare Payment System\n+ * Copyright (c) 2016 SocialEdge\n+ * <p>\n+ * This program is free software: you can redistribute it and/or modify\n+ * it under the terms of the GNU General Public License as published by\n+ * the Free Software Foundation, either version 3 of the License, or\n+ * (at your option) any later version.\n+ * <p>\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n+ * GNU General Public License for more details.\n+ */\n+package eu.socialedge.vega.backend.fare.domain.location;\n+\n+import org.apache.commons.lang3.Validate;\n+\n+import java.util.ArrayList;\n+import java.util.List;\n+\n+import lombok.EqualsAndHashCode;\n+import lombok.Getter;\n+import lombok.ToString;\n+import lombok.experimental.Accessors;\n+\n+@Getter\n+@ToString\n+@EqualsAndHashCode\n+@Accessors(fluent = true)\n+public class Zone {\n+\n+    private final String name;\n+\n+    private final List<Location> vertices;\n+\n+    public Zone(String name, List<Location> vertices) {\n+        Validate.notBlank(name);\n+        Validate.notNull(vertices);\n+\n+        this.name = name;\n+        this.vertices = vertices;\n+    }\n+\n+    public Zone(String name) {\n+        this(name, new ArrayList<>());\n+    }\n+\n+    public boolean contains(Location location) {\n+        Location[] verts = vertices.toArray(new Location[]{});\n+        boolean result = false;\n+        for (int i = 0, j = verts.length - 1; i < verts.length; j = i++) {\n+            if ((verts[i].longitude() > location.longitude()) != (verts[j].longitude() >","path":"backend-fare/src/main/java/eu/socialedge/vega/backend/fare/domain/location/Zone.java","position":null,"original_position":53,"commit_id":"a459e875918b813c55db8c08f06aefe7b9e08bb0","original_commit_id":"786f907114752cc26d1c5b5c098fec8159fc7b84","user":{"login":"wingsofovnia","id":5632544,"avatar_url":"https://avatars.githubusercontent.com/u/5632544?v=3","gravatar_id":"","url":"https://api.github.com/users/wingsofovnia","html_url":"https://github.com/wingsofovnia","followers_url":"https://api.github.com/users/wingsofovnia/followers","following_url":"https://api.github.com/users/wingsofovnia/following{/other_user}","gists_url":"https://api.github.com/users/wingsofovnia/gists{/gist_id}","starred_url":"https://api.github.com/users/wingsofovnia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wingsofovnia/subscriptions","organizations_url":"https://api.github.com/users/wingsofovnia/orgs","repos_url":"https://api.github.com/users/wingsofovnia/repos","events_url":"https://api.github.com/users/wingsofovnia/events{/privacy}","received_events_url":"https://api.github.com/users/wingsofovnia/received_events","type":"User","site_admin":false},"body":"Done","created_at":"2016-12-13T09:11:13Z","updated_at":"2016-12-13T09:11:14Z","html_url":"https://github.com/socialedge/vega/pull/20#discussion_r92124210","pull_request_url":"https://api.github.com/repos/socialedge/vega/pulls/20","_links":{"self":{"href":"https://api.github.com/repos/socialedge/vega/pulls/comments/92124210"},"html":{"href":"https://github.com/socialedge/vega/pull/20#discussion_r92124210"},"pull_request":{"href":"https://api.github.com/repos/socialedge/vega/pulls/20"}}},"pull_request":{"url":"https://api.github.com/repos/socialedge/vega/pulls/20","id":97560696,"html_url":"https://github.com/socialedge/vega/pull/20","diff_url":"https://github.com/socialedge/vega/pull/20.diff","patch_url":"https://github.com/socialedge/vega/pull/20.patch","issue_url":"https://api.github.com/repos/socialedge/vega/issues/20","number":20,"state":"open","locked":false,"title":"Implement vega.fare domain objects","user":{"login":"wingsofovnia","id":5632544,"avatar_url":"https://avatars.githubusercontent.com/u/5632544?v=3","gravatar_id":"","url":"https://api.github.com/users/wingsofovnia","html_url":"https://github.com/wingsofovnia","followers_url":"https://api.github.com/users/wingsofovnia/followers","following_url":"https://api.github.com/users/wingsofovnia/following{/other_user}","gists_url":"https://api.github.com/users/wingsofovnia/gists{/gist_id}","starred_url":"https://api.github.com/users/wingsofovnia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wingsofovnia/subscriptions","organizations_url":"https://api.github.com/users/wingsofovnia/orgs","repos_url":"https://api.github.com/users/wingsofovnia/repos","events_url":"https://api.github.com/users/wingsofovnia/events{/privacy}","received_events_url":"https://api.github.com/users/wingsofovnia/received_events","type":"User","site_admin":false},"body":"Implements #4 ","created_at":"2016-12-12T14:19:15Z","updated_at":"2016-12-13T09:11:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a485dd3ec52006216bc8ecfa5b9f047329a005de","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/socialedge/vega/pulls/20/commits","review_comments_url":"https://api.github.com/repos/socialedge/vega/pulls/20/comments","review_comment_url":"https://api.github.com/repos/socialedge/vega/pulls/comments{/number}","comments_url":"https://api.github.com/repos/socialedge/vega/issues/20/comments","statuses_url":"https://api.github.com/repos/socialedge/vega/statuses/a459e875918b813c55db8c08f06aefe7b9e08bb0","head":{"label":"socialedge:feature/4","ref":"feature/4","sha":"a459e875918b813c55db8c08f06aefe7b9e08bb0","user":{"login":"socialedge","id":19631212,"avatar_url":"https://avatars.githubusercontent.com/u/19631212?v=3","gravatar_id":"","url":"https://api.github.com/users/socialedge","html_url":"https://github.com/socialedge","followers_url":"https://api.github.com/users/socialedge/followers","following_url":"https://api.github.com/users/socialedge/following{/other_user}","gists_url":"https://api.github.com/users/socialedge/gists{/gist_id}","starred_url":"https://api.github.com/users/socialedge/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/socialedge/subscriptions","organizations_url":"https://api.github.com/users/socialedge/orgs","repos_url":"https://api.github.com/users/socialedge/repos","events_url":"https://api.github.com/users/socialedge/events{/privacy}","received_events_url":"https://api.github.com/users/socialedge/received_events","type":"Organization","site_admin":false},"repo":{"id":70053411,"name":"vega","full_name":"socialedge/vega","owner":{"login":"socialedge","id":19631212,"avatar_url":"https://avatars.githubusercontent.com/u/19631212?v=3","gravatar_id":"","url":"https://api.github.com/users/socialedge","html_url":"https://github.com/socialedge","followers_url":"https://api.github.com/users/socialedge/followers","following_url":"https://api.github.com/users/socialedge/following{/other_user}","gists_url":"https://api.github.com/users/socialedge/gists{/gist_id}","starred_url":"https://api.github.com/users/socialedge/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/socialedge/subscriptions","organizations_url":"https://api.github.com/users/socialedge/orgs","repos_url":"https://api.github.com/users/socialedge/repos","events_url":"https://api.github.com/users/socialedge/events{/privacy}","received_events_url":"https://api.github.com/users/socialedge/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/socialedge/vega","description":"An Electronic Transit Fare Payment System","fork":false,"url":"https://api.github.com/repos/socialedge/vega","forks_url":"https://api.github.com/repos/socialedge/vega/forks","keys_url":"https://api.github.com/repos/socialedge/vega/keys{/key_id}","collaborators_url":"https://api.github.com/repos/socialedge/vega/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/socialedge/vega/teams","hooks_url":"https://api.github.com/repos/socialedge/vega/hooks","issue_events_url":"https://api.github.com/repos/socialedge/vega/issues/events{/number}","events_url":"https://api.github.com/repos/socialedge/vega/events","assignees_url":"https://api.github.com/repos/socialedge/vega/assignees{/user}","branches_url":"https://api.github.com/repos/socialedge/vega/branches{/branch}","tags_url":"https://api.github.com/repos/socialedge/vega/tags","blobs_url":"https://api.github.com/repos/socialedge/vega/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/socialedge/vega/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/socialedge/vega/git/refs{/sha}","trees_url":"https://api.github.com/repos/socialedge/vega/git/trees{/sha}","statuses_url":"https://api.github.com/repos/socialedge/vega/statuses/{sha}","languages_url":"https://api.github.com/repos/socialedge/vega/languages","stargazers_url":"https://api.github.com/repos/socialedge/vega/stargazers","contributors_url":"https://api.github.com/repos/socialedge/vega/contributors","subscribers_url":"https://api.github.com/repos/socialedge/vega/subscribers","subscription_url":"https://api.github.com/repos/socialedge/vega/subscription","commits_url":"https://api.github.com/repos/socialedge/vega/commits{/sha}","git_commits_url":"https://api.github.com/repos/socialedge/vega/git/commits{/sha}","comments_url":"https://api.github.com/repos/socialedge/vega/comments{/number}","issue_comment_url":"https://api.github.com/repos/socialedge/vega/issues/comments{/number}","contents_url":"https://api.github.com/repos/socialedge/vega/contents/{+path}","compare_url":"https://api.github.com/repos/socialedge/vega/compare/{base}...{head}","merges_url":"https://api.github.com/repos/socialedge/vega/merges","archive_url":"https://api.github.com/repos/socialedge/vega/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/socialedge/vega/downloads","issues_url":"https://api.github.com/repos/socialedge/vega/issues{/number}","pulls_url":"https://api.github.com/repos/socialedge/vega/pulls{/number}","milestones_url":"https://api.github.com/repos/socialedge/vega/milestones{/number}","notifications_url":"https://api.github.com/repos/socialedge/vega/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/socialedge/vega/labels{/name}","releases_url":"https://api.github.com/repos/socialedge/vega/releases{/id}","deployments_url":"https://api.github.com/repos/socialedge/vega/deployments","created_at":"2016-10-05T11:17:58Z","updated_at":"2016-11-16T21:57:59Z","pushed_at":"2016-12-13T09:10:30Z","git_url":"git://github.com/socialedge/vega.git","ssh_url":"git@github.com:socialedge/vega.git","clone_url":"https://github.com/socialedge/vega.git","svn_url":"https://github.com/socialedge/vega","homepage":"","size":293,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":18,"forks":0,"open_issues":18,"watchers":0,"default_branch":"develop"}},"base":{"label":"socialedge:develop","ref":"develop","sha":"99c52d949beb57ee3aa8acbce343b178d42cf05b","user":{"login":"socialedge","id":19631212,"avatar_url":"https://avatars.githubusercontent.com/u/19631212?v=3","gravatar_id":"","url":"https://api.github.com/users/socialedge","html_url":"https://github.com/socialedge","followers_url":"https://api.github.com/users/socialedge/followers","following_url":"https://api.github.com/users/socialedge/following{/other_user}","gists_url":"https://api.github.com/users/socialedge/gists{/gist_id}","starred_url":"https://api.github.com/users/socialedge/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/socialedge/subscriptions","organizations_url":"https://api.github.com/users/socialedge/orgs","repos_url":"https://api.github.com/users/socialedge/repos","events_url":"https://api.github.com/users/socialedge/events{/privacy}","received_events_url":"https://api.github.com/users/socialedge/received_events","type":"Organization","site_admin":false},"repo":{"id":70053411,"name":"vega","full_name":"socialedge/vega","owner":{"login":"socialedge","id":19631212,"avatar_url":"https://avatars.githubusercontent.com/u/19631212?v=3","gravatar_id":"","url":"https://api.github.com/users/socialedge","html_url":"https://github.com/socialedge","followers_url":"https://api.github.com/users/socialedge/followers","following_url":"https://api.github.com/users/socialedge/following{/other_user}","gists_url":"https://api.github.com/users/socialedge/gists{/gist_id}","starred_url":"https://api.github.com/users/socialedge/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/socialedge/subscriptions","organizations_url":"https://api.github.com/users/socialedge/orgs","repos_url":"https://api.github.com/users/socialedge/repos","events_url":"https://api.github.com/users/socialedge/events{/privacy}","received_events_url":"https://api.github.com/users/socialedge/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/socialedge/vega","description":"An Electronic Transit Fare Payment System","fork":false,"url":"https://api.github.com/repos/socialedge/vega","forks_url":"https://api.github.com/repos/socialedge/vega/forks","keys_url":"https://api.github.com/repos/socialedge/vega/keys{/key_id}","collaborators_url":"https://api.github.com/repos/socialedge/vega/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/socialedge/vega/teams","hooks_url":"https://api.github.com/repos/socialedge/vega/hooks","issue_events_url":"https://api.github.com/repos/socialedge/vega/issues/events{/number}","events_url":"https://api.github.com/repos/socialedge/vega/events","assignees_url":"https://api.github.com/repos/socialedge/vega/assignees{/user}","branches_url":"https://api.github.com/repos/socialedge/vega/branches{/branch}","tags_url":"https://api.github.com/repos/socialedge/vega/tags","blobs_url":"https://api.github.com/repos/socialedge/vega/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/socialedge/vega/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/socialedge/vega/git/refs{/sha}","trees_url":"https://api.github.com/repos/socialedge/vega/git/trees{/sha}","statuses_url":"https://api.github.com/repos/socialedge/vega/statuses/{sha}","languages_url":"https://api.github.com/repos/socialedge/vega/languages","stargazers_url":"https://api.github.com/repos/socialedge/vega/stargazers","contributors_url":"https://api.github.com/repos/socialedge/vega/contributors","subscribers_url":"https://api.github.com/repos/socialedge/vega/subscribers","subscription_url":"https://api.github.com/repos/socialedge/vega/subscription","commits_url":"https://api.github.com/repos/socialedge/vega/commits{/sha}","git_commits_url":"https://api.github.com/repos/socialedge/vega/git/commits{/sha}","comments_url":"https://api.github.com/repos/socialedge/vega/comments{/number}","issue_comment_url":"https://api.github.com/repos/socialedge/vega/issues/comments{/number}","contents_url":"https://api.github.com/repos/socialedge/vega/contents/{+path}","compare_url":"https://api.github.com/repos/socialedge/vega/compare/{base}...{head}","merges_url":"https://api.github.com/repos/socialedge/vega/merges","archive_url":"https://api.github.com/repos/socialedge/vega/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/socialedge/vega/downloads","issues_url":"https://api.github.com/repos/socialedge/vega/issues{/number}","pulls_url":"https://api.github.com/repos/socialedge/vega/pulls{/number}","milestones_url":"https://api.github.com/repos/socialedge/vega/milestones{/number}","notifications_url":"https://api.github.com/repos/socialedge/vega/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/socialedge/vega/labels{/name}","releases_url":"https://api.github.com/repos/socialedge/vega/releases{/id}","deployments_url":"https://api.github.com/repos/socialedge/vega/deployments","created_at":"2016-10-05T11:17:58Z","updated_at":"2016-11-16T21:57:59Z","pushed_at":"2016-12-13T09:10:30Z","git_url":"git://github.com/socialedge/vega.git","ssh_url":"git@github.com:socialedge/vega.git","clone_url":"https://github.com/socialedge/vega.git","svn_url":"https://github.com/socialedge/vega","homepage":"","size":293,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":18,"forks":0,"open_issues":18,"watchers":0,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/socialedge/vega/pulls/20"},"html":{"href":"https://github.com/socialedge/vega/pull/20"},"issue":{"href":"https://api.github.com/repos/socialedge/vega/issues/20"},"comments":{"href":"https://api.github.com/repos/socialedge/vega/issues/20/comments"},"review_comments":{"href":"https://api.github.com/repos/socialedge/vega/pulls/20/comments"},"review_comment":{"href":"https://api.github.com/repos/socialedge/vega/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/socialedge/vega/pulls/20/commits"},"statuses":{"href":"https://api.github.com/repos/socialedge/vega/statuses/a459e875918b813c55db8c08f06aefe7b9e08bb0"}}}}
{"actor":{"display_login":"wingsofovnia"}}