{"action":"created","comment":{"url":"https://api.github.com/repos/tomtom-international/speedtools/pulls/comments/147409085","pull_request_review_id":72502315,"id":147409085,"diff_hunk":"@@ -50,26 +50,38 @@ public GeoPolyLine(@Nonnull final List<GeoPoint> points) {\n         assert points != null;\n         assert points.size() >= 2;\n \n-        // Find the first elevation.\n-        double elevationMeters = Double.NaN;\n-        for (final GeoPoint point : points) {\n-            if (point.getElevationMeters() != null) {\n-                elevationMeters = point.getElevationMetersOrNaN();\n-                break;\n-            }\n-        }\n+        // Check the need to correct the elevation in a list of points.\n+        final List<GeoPoint> elevatedPoints;\n+        final boolean noneElevated = points.stream().allMatch(x -> (x.getElevationMeters() != null));\n+        final boolean allElevated = points.stream().allMatch(x -> (x.getElevationMeters() == null));","path":"geo/src/main/java/com/tomtom/speedtools/geometry/GeoPolyLine.java","position":null,"original_position":15,"commit_id":"67d86d005f67f33b84968cee8676aec084c376d3","original_commit_id":"67d86d005f67f33b84968cee8676aec084c376d3","user":{"login":"rijnb","id":900135,"avatar_url":"https://avatars3.githubusercontent.com/u/900135?v=4","gravatar_id":"","url":"https://api.github.com/users/rijnb","html_url":"https://github.com/rijnb","followers_url":"https://api.github.com/users/rijnb/followers","following_url":"https://api.github.com/users/rijnb/following{/other_user}","gists_url":"https://api.github.com/users/rijnb/gists{/gist_id}","starred_url":"https://api.github.com/users/rijnb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rijnb/subscriptions","organizations_url":"https://api.github.com/users/rijnb/orgs","repos_url":"https://api.github.com/users/rijnb/repos","events_url":"https://api.github.com/users/rijnb/events{/privacy}","received_events_url":"https://api.github.com/users/rijnb/received_events","type":"User","site_admin":false},"body":"By using noneMatch twice, they should be cheap.","created_at":"2017-10-27T13:22:09Z","updated_at":"2017-10-27T13:22:09Z","html_url":"https://github.com/tomtom-international/speedtools/pull/9#discussion_r147409085","pull_request_url":"https://api.github.com/repos/tomtom-international/speedtools/pulls/9","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/tomtom-international/speedtools/pulls/comments/147409085"},"html":{"href":"https://github.com/tomtom-international/speedtools/pull/9#discussion_r147409085"},"pull_request":{"href":"https://api.github.com/repos/tomtom-international/speedtools/pulls/9"}},"in_reply_to_id":147404878},"pull_request":{"url":"https://api.github.com/repos/tomtom-international/speedtools/pulls/9","id":149145083,"html_url":"https://github.com/tomtom-international/speedtools/pull/9","diff_url":"https://github.com/tomtom-international/speedtools/pull/9.diff","patch_url":"https://github.com/tomtom-international/speedtools/pull/9.patch","issue_url":"https://api.github.com/repos/tomtom-international/speedtools/issues/9","number":9,"state":"open","locked":false,"title":"Added elevation to remaining classes","user":{"login":"rijnb","id":900135,"avatar_url":"https://avatars3.githubusercontent.com/u/900135?v=4","gravatar_id":"","url":"https://api.github.com/users/rijnb","html_url":"https://github.com/rijnb","followers_url":"https://api.github.com/users/rijnb/followers","following_url":"https://api.github.com/users/rijnb/following{/other_user}","gists_url":"https://api.github.com/users/rijnb/gists{/gist_id}","starred_url":"https://api.github.com/users/rijnb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rijnb/subscriptions","organizations_url":"https://api.github.com/users/rijnb/orgs","repos_url":"https://api.github.com/users/rijnb/repos","events_url":"https://api.github.com/users/rijnb/events{/privacy}","received_events_url":"https://api.github.com/users/rijnb/received_events","type":"User","site_admin":false},"body":"* Included `elevationMeters` in remaining `Geo`-classes. All operations now support elevations, including\r\ntranslation and length calculations. \r\n\r\n* Geo-objects like lines, polylines, rectangles etc. now always have either no elevation at all, or all\r\ntheir points or corners do have an elevation.  \r\n\r\n* Added unit tests to test elevation behavior.\r\n","created_at":"2017-10-27T09:47:19Z","updated_at":"2017-10-27T13:22:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"09ed114b6ec785697cd2bad9678716a90e218c57","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/tomtom-international/speedtools/pulls/9/commits","review_comments_url":"https://api.github.com/repos/tomtom-international/speedtools/pulls/9/comments","review_comment_url":"https://api.github.com/repos/tomtom-international/speedtools/pulls/comments{/number}","comments_url":"https://api.github.com/repos/tomtom-international/speedtools/issues/9/comments","statuses_url":"https://api.github.com/repos/tomtom-international/speedtools/statuses/67d86d005f67f33b84968cee8676aec084c376d3","head":{"label":"tomtom-international:dev","ref":"dev","sha":"67d86d005f67f33b84968cee8676aec084c376d3","user":{"login":"tomtom-international","id":11631435,"avatar_url":"https://avatars2.githubusercontent.com/u/11631435?v=4","gravatar_id":"","url":"https://api.github.com/users/tomtom-international","html_url":"https://github.com/tomtom-international","followers_url":"https://api.github.com/users/tomtom-international/followers","following_url":"https://api.github.com/users/tomtom-international/following{/other_user}","gists_url":"https://api.github.com/users/tomtom-international/gists{/gist_id}","starred_url":"https://api.github.com/users/tomtom-international/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomtom-international/subscriptions","organizations_url":"https://api.github.com/users/tomtom-international/orgs","repos_url":"https://api.github.com/users/tomtom-international/repos","events_url":"https://api.github.com/users/tomtom-international/events{/privacy}","received_events_url":"https://api.github.com/users/tomtom-international/received_events","type":"Organization","site_admin":false},"repo":{"id":32808027,"name":"speedtools","full_name":"tomtom-international/speedtools","owner":{"login":"tomtom-international","id":11631435,"avatar_url":"https://avatars2.githubusercontent.com/u/11631435?v=4","gravatar_id":"","url":"https://api.github.com/users/tomtom-international","html_url":"https://github.com/tomtom-international","followers_url":"https://api.github.com/users/tomtom-international/followers","following_url":"https://api.github.com/users/tomtom-international/following{/other_user}","gists_url":"https://api.github.com/users/tomtom-international/gists{/gist_id}","starred_url":"https://api.github.com/users/tomtom-international/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomtom-international/subscriptions","organizations_url":"https://api.github.com/users/tomtom-international/orgs","repos_url":"https://api.github.com/users/tomtom-international/repos","events_url":"https://api.github.com/users/tomtom-international/events{/privacy}","received_events_url":"https://api.github.com/users/tomtom-international/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/tomtom-international/speedtools","description":"The official SpeedTools Library for Java - donated by TomTom","fork":false,"url":"https://api.github.com/repos/tomtom-international/speedtools","forks_url":"https://api.github.com/repos/tomtom-international/speedtools/forks","keys_url":"https://api.github.com/repos/tomtom-international/speedtools/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tomtom-international/speedtools/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tomtom-international/speedtools/teams","hooks_url":"https://api.github.com/repos/tomtom-international/speedtools/hooks","issue_events_url":"https://api.github.com/repos/tomtom-international/speedtools/issues/events{/number}","events_url":"https://api.github.com/repos/tomtom-international/speedtools/events","assignees_url":"https://api.github.com/repos/tomtom-international/speedtools/assignees{/user}","branches_url":"https://api.github.com/repos/tomtom-international/speedtools/branches{/branch}","tags_url":"https://api.github.com/repos/tomtom-international/speedtools/tags","blobs_url":"https://api.github.com/repos/tomtom-international/speedtools/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tomtom-international/speedtools/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tomtom-international/speedtools/git/refs{/sha}","trees_url":"https://api.github.com/repos/tomtom-international/speedtools/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tomtom-international/speedtools/statuses/{sha}","languages_url":"https://api.github.com/repos/tomtom-international/speedtools/languages","stargazers_url":"https://api.github.com/repos/tomtom-international/speedtools/stargazers","contributors_url":"https://api.github.com/repos/tomtom-international/speedtools/contributors","subscribers_url":"https://api.github.com/repos/tomtom-international/speedtools/subscribers","subscription_url":"https://api.github.com/repos/tomtom-international/speedtools/subscription","commits_url":"https://api.github.com/repos/tomtom-international/speedtools/commits{/sha}","git_commits_url":"https://api.github.com/repos/tomtom-international/speedtools/git/commits{/sha}","comments_url":"https://api.github.com/repos/tomtom-international/speedtools/comments{/number}","issue_comment_url":"https://api.github.com/repos/tomtom-international/speedtools/issues/comments{/number}","contents_url":"https://api.github.com/repos/tomtom-international/speedtools/contents/{+path}","compare_url":"https://api.github.com/repos/tomtom-international/speedtools/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tomtom-international/speedtools/merges","archive_url":"https://api.github.com/repos/tomtom-international/speedtools/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tomtom-international/speedtools/downloads","issues_url":"https://api.github.com/repos/tomtom-international/speedtools/issues{/number}","pulls_url":"https://api.github.com/repos/tomtom-international/speedtools/pulls{/number}","milestones_url":"https://api.github.com/repos/tomtom-international/speedtools/milestones{/number}","notifications_url":"https://api.github.com/repos/tomtom-international/speedtools/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tomtom-international/speedtools/labels{/name}","releases_url":"https://api.github.com/repos/tomtom-international/speedtools/releases{/id}","deployments_url":"https://api.github.com/repos/tomtom-international/speedtools/deployments","created_at":"2015-03-24T15:39:38Z","updated_at":"2017-07-11T18:01:04Z","pushed_at":"2017-10-27T12:36:53Z","git_url":"git://github.com/tomtom-international/speedtools.git","ssh_url":"git@github.com:tomtom-international/speedtools.git","clone_url":"https://github.com/tomtom-international/speedtools.git","svn_url":"https://github.com/tomtom-international/speedtools","homepage":"http://tomtom-international.github.io/speedtools","size":5143,"stargazers_count":5,"watchers_count":5,"language":"Java","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":4,"mirror_url":null,"archived":false,"open_issues_count":1,"forks":4,"open_issues":1,"watchers":5,"default_branch":"master"}},"base":{"label":"tomtom-international:master","ref":"master","sha":"84293f1793084a4500a13e8e98660aa11ee553c6","user":{"login":"tomtom-international","id":11631435,"avatar_url":"https://avatars2.githubusercontent.com/u/11631435?v=4","gravatar_id":"","url":"https://api.github.com/users/tomtom-international","html_url":"https://github.com/tomtom-international","followers_url":"https://api.github.com/users/tomtom-international/followers","following_url":"https://api.github.com/users/tomtom-international/following{/other_user}","gists_url":"https://api.github.com/users/tomtom-international/gists{/gist_id}","starred_url":"https://api.github.com/users/tomtom-international/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomtom-international/subscriptions","organizations_url":"https://api.github.com/users/tomtom-international/orgs","repos_url":"https://api.github.com/users/tomtom-international/repos","events_url":"https://api.github.com/users/tomtom-international/events{/privacy}","received_events_url":"https://api.github.com/users/tomtom-international/received_events","type":"Organization","site_admin":false},"repo":{"id":32808027,"name":"speedtools","full_name":"tomtom-international/speedtools","owner":{"login":"tomtom-international","id":11631435,"avatar_url":"https://avatars2.githubusercontent.com/u/11631435?v=4","gravatar_id":"","url":"https://api.github.com/users/tomtom-international","html_url":"https://github.com/tomtom-international","followers_url":"https://api.github.com/users/tomtom-international/followers","following_url":"https://api.github.com/users/tomtom-international/following{/other_user}","gists_url":"https://api.github.com/users/tomtom-international/gists{/gist_id}","starred_url":"https://api.github.com/users/tomtom-international/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomtom-international/subscriptions","organizations_url":"https://api.github.com/users/tomtom-international/orgs","repos_url":"https://api.github.com/users/tomtom-international/repos","events_url":"https://api.github.com/users/tomtom-international/events{/privacy}","received_events_url":"https://api.github.com/users/tomtom-international/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/tomtom-international/speedtools","description":"The official SpeedTools Library for Java - donated by TomTom","fork":false,"url":"https://api.github.com/repos/tomtom-international/speedtools","forks_url":"https://api.github.com/repos/tomtom-international/speedtools/forks","keys_url":"https://api.github.com/repos/tomtom-international/speedtools/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tomtom-international/speedtools/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tomtom-international/speedtools/teams","hooks_url":"https://api.github.com/repos/tomtom-international/speedtools/hooks","issue_events_url":"https://api.github.com/repos/tomtom-international/speedtools/issues/events{/number}","events_url":"https://api.github.com/repos/tomtom-international/speedtools/events","assignees_url":"https://api.github.com/repos/tomtom-international/speedtools/assignees{/user}","branches_url":"https://api.github.com/repos/tomtom-international/speedtools/branches{/branch}","tags_url":"https://api.github.com/repos/tomtom-international/speedtools/tags","blobs_url":"https://api.github.com/repos/tomtom-international/speedtools/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tomtom-international/speedtools/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tomtom-international/speedtools/git/refs{/sha}","trees_url":"https://api.github.com/repos/tomtom-international/speedtools/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tomtom-international/speedtools/statuses/{sha}","languages_url":"https://api.github.com/repos/tomtom-international/speedtools/languages","stargazers_url":"https://api.github.com/repos/tomtom-international/speedtools/stargazers","contributors_url":"https://api.github.com/repos/tomtom-international/speedtools/contributors","subscribers_url":"https://api.github.com/repos/tomtom-international/speedtools/subscribers","subscription_url":"https://api.github.com/repos/tomtom-international/speedtools/subscription","commits_url":"https://api.github.com/repos/tomtom-international/speedtools/commits{/sha}","git_commits_url":"https://api.github.com/repos/tomtom-international/speedtools/git/commits{/sha}","comments_url":"https://api.github.com/repos/tomtom-international/speedtools/comments{/number}","issue_comment_url":"https://api.github.com/repos/tomtom-international/speedtools/issues/comments{/number}","contents_url":"https://api.github.com/repos/tomtom-international/speedtools/contents/{+path}","compare_url":"https://api.github.com/repos/tomtom-international/speedtools/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tomtom-international/speedtools/merges","archive_url":"https://api.github.com/repos/tomtom-international/speedtools/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tomtom-international/speedtools/downloads","issues_url":"https://api.github.com/repos/tomtom-international/speedtools/issues{/number}","pulls_url":"https://api.github.com/repos/tomtom-international/speedtools/pulls{/number}","milestones_url":"https://api.github.com/repos/tomtom-international/speedtools/milestones{/number}","notifications_url":"https://api.github.com/repos/tomtom-international/speedtools/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tomtom-international/speedtools/labels{/name}","releases_url":"https://api.github.com/repos/tomtom-international/speedtools/releases{/id}","deployments_url":"https://api.github.com/repos/tomtom-international/speedtools/deployments","created_at":"2015-03-24T15:39:38Z","updated_at":"2017-07-11T18:01:04Z","pushed_at":"2017-10-27T12:36:53Z","git_url":"git://github.com/tomtom-international/speedtools.git","ssh_url":"git@github.com:tomtom-international/speedtools.git","clone_url":"https://github.com/tomtom-international/speedtools.git","svn_url":"https://github.com/tomtom-international/speedtools","homepage":"http://tomtom-international.github.io/speedtools","size":5143,"stargazers_count":5,"watchers_count":5,"language":"Java","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":4,"mirror_url":null,"archived":false,"open_issues_count":1,"forks":4,"open_issues":1,"watchers":5,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/tomtom-international/speedtools/pulls/9"},"html":{"href":"https://github.com/tomtom-international/speedtools/pull/9"},"issue":{"href":"https://api.github.com/repos/tomtom-international/speedtools/issues/9"},"comments":{"href":"https://api.github.com/repos/tomtom-international/speedtools/issues/9/comments"},"review_comments":{"href":"https://api.github.com/repos/tomtom-international/speedtools/pulls/9/comments"},"review_comment":{"href":"https://api.github.com/repos/tomtom-international/speedtools/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/tomtom-international/speedtools/pulls/9/commits"},"statuses":{"href":"https://api.github.com/repos/tomtom-international/speedtools/statuses/67d86d005f67f33b84968cee8676aec084c376d3"}},"author_association":"OWNER"}}
{"actor":{"display_login":"rijnb"}}