{"action":"created","comment":{"url":"https://api.github.com/repos/nus-cs2103-AY1617S1/addressbook-level2/pulls/comments/77449277","id":77449277,"diff_hunk":"@@ -7,52 +7,215 @@\n  * Guarantees: immutable; is valid as declared in {@link #isValidAddress(String)}\n  */\n public class Address {\n+\t\n+\tprivate boolean isPrivate;\n+\tpublic Block block;\n+\tpublic Street street;\n+\tpublic Unit unit;\n+\tpublic PostalCode postalCode;\n \n-    public static final String EXAMPLE = \"123, some street\";\n-    public static final String MESSAGE_ADDRESS_CONSTRAINTS = \"Person addresses can be in any format\";\n-    public static final String ADDRESS_VALIDATION_REGEX = \".+\";\n-\n-    public final String value;\n-    private boolean isPrivate;\n+    public static final String EXAMPLE = \"123, Clementi Ave 3, #12-34, 231534\";\n+    public static final String MESSAGE_ADDRESS_CONSTRAINTS = \"Person addresses must follow the format: <BLOCK>, <STREET>, #<FLOOR>-<ROOM>, <POSTALCODE>, where BLOCK, FLOOR, ROOM are integers, and POSTALCODE is a 6 digit integer.\";\n \n     /**\n      * Validates given address.\n-     *\n+     * \n      * @throws IllegalValueException if given address string is invalid.\n      */\n     public Address(String address, boolean isPrivate) throws IllegalValueException {\n-        this.isPrivate = isPrivate;\n-        if (!isValidAddress(address)) {\n-            throw new IllegalValueException(MESSAGE_ADDRESS_CONSTRAINTS);\n-        }\n-        this.value = address;\n+    \tif (!isValidAddress(address)) {\n+    \t\tthrow new IllegalValueException(MESSAGE_ADDRESS_CONSTRAINTS);","path":"src/seedu/addressbook/data/person/Address.java","position":33,"original_position":33,"commit_id":"d8dae4af75990efb00e422a649412c2c858df248","original_commit_id":"940571cd7542219b626f26f75239b81582238253","user":{"login":"cmkumar87","id":1673676,"avatar_url":"https://avatars.githubusercontent.com/u/1673676?v=3","gravatar_id":"","url":"https://api.github.com/users/cmkumar87","html_url":"https://github.com/cmkumar87","followers_url":"https://api.github.com/users/cmkumar87/followers","following_url":"https://api.github.com/users/cmkumar87/following{/other_user}","gists_url":"https://api.github.com/users/cmkumar87/gists{/gist_id}","starred_url":"https://api.github.com/users/cmkumar87/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cmkumar87/subscriptions","organizations_url":"https://api.github.com/users/cmkumar87/orgs","repos_url":"https://api.github.com/users/cmkumar87/repos","events_url":"https://api.github.com/users/cmkumar87/events{/privacy}","received_events_url":"https://api.github.com/users/cmkumar87/received_events","type":"User","site_admin":false},"body":"delegate validating different parts of the address to the relevant class. That is, for e.g., Block should validate if block part of the address string is formatted correctly.","created_at":"2016-09-04T09:17:35Z","updated_at":"2016-09-04T09:17:35Z","html_url":"https://github.com/nus-cs2103-AY1617S1/addressbook-level2/pull/646#discussion_r77449277","pull_request_url":"https://api.github.com/repos/nus-cs2103-AY1617S1/addressbook-level2/pulls/646","_links":{"self":{"href":"https://api.github.com/repos/nus-cs2103-AY1617S1/addressbook-level2/pulls/comments/77449277"},"html":{"href":"https://github.com/nus-cs2103-AY1617S1/addressbook-level2/pull/646#discussion_r77449277"},"pull_request":{"href":"https://api.github.com/repos/nus-cs2103-AY1617S1/addressbook-level2/pulls/646"}}},"pull_request":{"url":"https://api.github.com/repos/nus-cs2103-AY1617S1/addressbook-level2/pulls/646","id":83727980,"html_url":"https://github.com/nus-cs2103-AY1617S1/addressbook-level2/pull/646","diff_url":"https://github.com/nus-cs2103-AY1617S1/addressbook-level2/pull/646.diff","patch_url":"https://github.com/nus-cs2103-AY1617S1/addressbook-level2/pull/646.patch","issue_url":"https://api.github.com/repos/nus-cs2103-AY1617S1/addressbook-level2/issues/646","number":646,"state":"open","locked":false,"title":"[T3A2][F11-A3]Irvin Lim","user":{"login":"irvinlim","id":9884746,"avatar_url":"https://avatars.githubusercontent.com/u/9884746?v=3","gravatar_id":"","url":"https://api.github.com/users/irvinlim","html_url":"https://github.com/irvinlim","followers_url":"https://api.github.com/users/irvinlim/followers","following_url":"https://api.github.com/users/irvinlim/following{/other_user}","gists_url":"https://api.github.com/users/irvinlim/gists{/gist_id}","starred_url":"https://api.github.com/users/irvinlim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/irvinlim/subscriptions","organizations_url":"https://api.github.com/users/irvinlim/orgs","repos_url":"https://api.github.com/users/irvinlim/repos","events_url":"https://api.github.com/users/irvinlim/events{/privacy}","received_events_url":"https://api.github.com/users/irvinlim/received_events","type":"User","site_admin":false},"body":"Ready for review","created_at":"2016-09-02T00:18:12Z","updated_at":"2016-09-04T09:17:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"854d7339d8f2a934763ac5545324f73266987a30","assignee":{"login":"cmkumar87","id":1673676,"avatar_url":"https://avatars.githubusercontent.com/u/1673676?v=3","gravatar_id":"","url":"https://api.github.com/users/cmkumar87","html_url":"https://github.com/cmkumar87","followers_url":"https://api.github.com/users/cmkumar87/followers","following_url":"https://api.github.com/users/cmkumar87/following{/other_user}","gists_url":"https://api.github.com/users/cmkumar87/gists{/gist_id}","starred_url":"https://api.github.com/users/cmkumar87/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cmkumar87/subscriptions","organizations_url":"https://api.github.com/users/cmkumar87/orgs","repos_url":"https://api.github.com/users/cmkumar87/repos","events_url":"https://api.github.com/users/cmkumar87/events{/privacy}","received_events_url":"https://api.github.com/users/cmkumar87/received_events","type":"User","site_admin":false},"assignees":[{"login":"cmkumar87","id":1673676,"avatar_url":"https://avatars.githubusercontent.com/u/1673676?v=3","gravatar_id":"","url":"https://api.github.com/users/cmkumar87","html_url":"https://github.com/cmkumar87","followers_url":"https://api.github.com/users/cmkumar87/followers","following_url":"https://api.github.com/users/cmkumar87/following{/other_user}","gists_url":"https://api.github.com/users/cmkumar87/gists{/gist_id}","starred_url":"https://api.github.com/users/cmkumar87/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cmkumar87/subscriptions","organizations_url":"https://api.github.com/users/cmkumar87/orgs","repos_url":"https://api.github.com/users/cmkumar87/repos","events_url":"https://api.github.com/users/cmkumar87/events{/privacy}","received_events_url":"https://api.github.com/users/cmkumar87/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/nus-cs2103-AY1617S1/addressbook-level2/pulls/646/commits","review_comments_url":"https://api.github.com/repos/nus-cs2103-AY1617S1/addressbook-level2/pulls/646/comments","review_comment_url":"https://api.github.com/repos/nus-cs2103-AY1617S1/addressbook-level2/pulls/comments{/number}","comments_url":"https://api.github.com/repos/nus-cs2103-AY1617S1/addressbook-level2/issues/646/comments","statuses_url":"https://api.github.com/repos/nus-cs2103-AY1617S1/addressbook-level2/statuses/d8dae4af75990efb00e422a649412c2c858df248","head":{"label":"irvinlim:master","ref":"master","sha":"d8dae4af75990efb00e422a649412c2c858df248","user":{"login":"irvinlim","id":9884746,"avatar_url":"https://avatars.githubusercontent.com/u/9884746?v=3","gravatar_id":"","url":"https://api.github.com/users/irvinlim","html_url":"https://github.com/irvinlim","followers_url":"https://api.github.com/users/irvinlim/followers","following_url":"https://api.github.com/users/irvinlim/following{/other_user}","gists_url":"https://api.github.com/users/irvinlim/gists{/gist_id}","starred_url":"https://api.github.com/users/irvinlim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/irvinlim/subscriptions","organizations_url":"https://api.github.com/users/irvinlim/orgs","repos_url":"https://api.github.com/users/irvinlim/repos","events_url":"https://api.github.com/users/irvinlim/events{/privacy}","received_events_url":"https://api.github.com/users/irvinlim/received_events","type":"User","site_admin":false},"repo":{"id":67175579,"name":"addressbook-level2","full_name":"irvinlim/addressbook-level2","owner":{"login":"irvinlim","id":9884746,"avatar_url":"https://avatars.githubusercontent.com/u/9884746?v=3","gravatar_id":"","url":"https://api.github.com/users/irvinlim","html_url":"https://github.com/irvinlim","followers_url":"https://api.github.com/users/irvinlim/followers","following_url":"https://api.github.com/users/irvinlim/following{/other_user}","gists_url":"https://api.github.com/users/irvinlim/gists{/gist_id}","starred_url":"https://api.github.com/users/irvinlim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/irvinlim/subscriptions","organizations_url":"https://api.github.com/users/irvinlim/orgs","repos_url":"https://api.github.com/users/irvinlim/repos","events_url":"https://api.github.com/users/irvinlim/events{/privacy}","received_events_url":"https://api.github.com/users/irvinlim/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/irvinlim/addressbook-level2","description":"A Java sample application for students. An AddressBook application that uses OOP basics.","fork":true,"url":"https://api.github.com/repos/irvinlim/addressbook-level2","forks_url":"https://api.github.com/repos/irvinlim/addressbook-level2/forks","keys_url":"https://api.github.com/repos/irvinlim/addressbook-level2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/irvinlim/addressbook-level2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/irvinlim/addressbook-level2/teams","hooks_url":"https://api.github.com/repos/irvinlim/addressbook-level2/hooks","issue_events_url":"https://api.github.com/repos/irvinlim/addressbook-level2/issues/events{/number}","events_url":"https://api.github.com/repos/irvinlim/addressbook-level2/events","assignees_url":"https://api.github.com/repos/irvinlim/addressbook-level2/assignees{/user}","branches_url":"https://api.github.com/repos/irvinlim/addressbook-level2/branches{/branch}","tags_url":"https://api.github.com/repos/irvinlim/addressbook-level2/tags","blobs_url":"https://api.github.com/repos/irvinlim/addressbook-level2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/irvinlim/addressbook-level2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/irvinlim/addressbook-level2/git/refs{/sha}","trees_url":"https://api.github.com/repos/irvinlim/addressbook-level2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/irvinlim/addressbook-level2/statuses/{sha}","languages_url":"https://api.github.com/repos/irvinlim/addressbook-level2/languages","stargazers_url":"https://api.github.com/repos/irvinlim/addressbook-level2/stargazers","contributors_url":"https://api.github.com/repos/irvinlim/addressbook-level2/contributors","subscribers_url":"https://api.github.com/repos/irvinlim/addressbook-level2/subscribers","subscription_url":"https://api.github.com/repos/irvinlim/addressbook-level2/subscription","commits_url":"https://api.github.com/repos/irvinlim/addressbook-level2/commits{/sha}","git_commits_url":"https://api.github.com/repos/irvinlim/addressbook-level2/git/commits{/sha}","comments_url":"https://api.github.com/repos/irvinlim/addressbook-level2/comments{/number}","issue_comment_url":"https://api.github.com/repos/irvinlim/addressbook-level2/issues/comments{/number}","contents_url":"https://api.github.com/repos/irvinlim/addressbook-level2/contents/{+path}","compare_url":"https://api.github.com/repos/irvinlim/addressbook-level2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/irvinlim/addressbook-level2/merges","archive_url":"https://api.github.com/repos/irvinlim/addressbook-level2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/irvinlim/addressbook-level2/downloads","issues_url":"https://api.github.com/repos/irvinlim/addressbook-level2/issues{/number}","pulls_url":"https://api.github.com/repos/irvinlim/addressbook-level2/pulls{/number}","milestones_url":"https://api.github.com/repos/irvinlim/addressbook-level2/milestones{/number}","notifications_url":"https://api.github.com/repos/irvinlim/addressbook-level2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/irvinlim/addressbook-level2/labels{/name}","releases_url":"https://api.github.com/repos/irvinlim/addressbook-level2/releases{/id}","deployments_url":"https://api.github.com/repos/irvinlim/addressbook-level2/deployments","created_at":"2016-09-02T00:13:47Z","updated_at":"2016-09-02T00:13:48Z","pushed_at":"2016-09-02T01:52:05Z","git_url":"git://github.com/irvinlim/addressbook-level2.git","ssh_url":"git@github.com:irvinlim/addressbook-level2.git","clone_url":"https://github.com/irvinlim/addressbook-level2.git","svn_url":"https://github.com/irvinlim/addressbook-level2","homepage":null,"size":2998,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"nus-cs2103-AY1617S1:master","ref":"master","sha":"19f22e05d9fa4c555d2526f2ed3e70fb336eb43a","user":{"login":"nus-cs2103-AY1617S1","id":20475842,"avatar_url":"https://avatars.githubusercontent.com/u/20475842?v=3","gravatar_id":"","url":"https://api.github.com/users/nus-cs2103-AY1617S1","html_url":"https://github.com/nus-cs2103-AY1617S1","followers_url":"https://api.github.com/users/nus-cs2103-AY1617S1/followers","following_url":"https://api.github.com/users/nus-cs2103-AY1617S1/following{/other_user}","gists_url":"https://api.github.com/users/nus-cs2103-AY1617S1/gists{/gist_id}","starred_url":"https://api.github.com/users/nus-cs2103-AY1617S1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nus-cs2103-AY1617S1/subscriptions","organizations_url":"https://api.github.com/users/nus-cs2103-AY1617S1/orgs","repos_url":"https://api.github.com/users/nus-cs2103-AY1617S1/repos","events_url":"https://api.github.com/users/nus-cs2103-AY1617S1/events{/privacy}","received_events_url":"https://api.github.com/users/nus-cs2103-AY1617S1/received_events","type":"Organization","site_admin":false},"repo":{"id":66551047,"name":"addressbook-level2","full_name":"nus-cs2103-AY1617S1/addressbook-level2","owner":{"login":"nus-cs2103-AY1617S1","id":20475842,"avatar_url":"https://avatars.githubusercontent.com/u/20475842?v=3","gravatar_id":"","url":"https://api.github.com/users/nus-cs2103-AY1617S1","html_url":"https://github.com/nus-cs2103-AY1617S1","followers_url":"https://api.github.com/users/nus-cs2103-AY1617S1/followers","following_url":"https://api.github.com/users/nus-cs2103-AY1617S1/following{/other_user}","gists_url":"https://api.github.com/users/nus-cs2103-AY1617S1/gists{/gist_id}","starred_url":"https://api.github.com/users/nus-cs2103-AY1617S1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nus-cs2103-AY1617S1/subscriptions","organizations_url":"https://api.github.com/users/nus-cs2103-AY1617S1/orgs","repos_url":"https://api.github.com/users/nus-cs2103-AY1617S1/repos","events_url":"https://api.github.com/users/nus-cs2103-AY1617S1/events{/privacy}","received_events_url":"https://api.github.com/users/nus-cs2103-AY1617S1/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/nus-cs2103-AY1617S1/addressbook-level2","description":"A Java sample application for students. An AddressBook application that uses OOP basics.","fork":true,"url":"https://api.github.com/repos/nus-cs2103-AY1617S1/addressbook-level2","forks_url":"https://api.github.com/repos/nus-cs2103-AY1617S1/addressbook-level2/forks","keys_url":"https://api.github.com/repos/nus-cs2103-AY1617S1/addressbook-level2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nus-cs2103-AY1617S1/addressbook-level2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nus-cs2103-AY1617S1/addressbook-level2/teams","hooks_url":"https://api.github.com/repos/nus-cs2103-AY1617S1/addressbook-level2/hooks","issue_events_url":"https://api.github.com/repos/nus-cs2103-AY1617S1/addressbook-level2/issues/events{/number}","events_url":"https://api.github.com/repos/nus-cs2103-AY1617S1/addressbook-level2/events","assignees_url":"https://api.github.com/repos/nus-cs2103-AY1617S1/addressbook-level2/assignees{/user}","branches_url":"https://api.github.com/repos/nus-cs2103-AY1617S1/addressbook-level2/branches{/branch}","tags_url":"https://api.github.com/repos/nus-cs2103-AY1617S1/addressbook-level2/tags","blobs_url":"https://api.github.com/repos/nus-cs2103-AY1617S1/addressbook-level2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nus-cs2103-AY1617S1/addressbook-level2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nus-cs2103-AY1617S1/addressbook-level2/git/refs{/sha}","trees_url":"https://api.github.com/repos/nus-cs2103-AY1617S1/addressbook-level2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nus-cs2103-AY1617S1/addressbook-level2/statuses/{sha}","languages_url":"https://api.github.com/repos/nus-cs2103-AY1617S1/addressbook-level2/languages","stargazers_url":"https://api.github.com/repos/nus-cs2103-AY1617S1/addressbook-level2/stargazers","contributors_url":"https://api.github.com/repos/nus-cs2103-AY1617S1/addressbook-level2/contributors","subscribers_url":"https://api.github.com/repos/nus-cs2103-AY1617S1/addressbook-level2/subscribers","subscription_url":"https://api.github.com/repos/nus-cs2103-AY1617S1/addressbook-level2/subscription","commits_url":"https://api.github.com/repos/nus-cs2103-AY1617S1/addressbook-level2/commits{/sha}","git_commits_url":"https://api.github.com/repos/nus-cs2103-AY1617S1/addressbook-level2/git/commits{/sha}","comments_url":"https://api.github.com/repos/nus-cs2103-AY1617S1/addressbook-level2/comments{/number}","issue_comment_url":"https://api.github.com/repos/nus-cs2103-AY1617S1/addressbook-level2/issues/comments{/number}","contents_url":"https://api.github.com/repos/nus-cs2103-AY1617S1/addressbook-level2/contents/{+path}","compare_url":"https://api.github.com/repos/nus-cs2103-AY1617S1/addressbook-level2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nus-cs2103-AY1617S1/addressbook-level2/merges","archive_url":"https://api.github.com/repos/nus-cs2103-AY1617S1/addressbook-level2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nus-cs2103-AY1617S1/addressbook-level2/downloads","issues_url":"https://api.github.com/repos/nus-cs2103-AY1617S1/addressbook-level2/issues{/number}","pulls_url":"https://api.github.com/repos/nus-cs2103-AY1617S1/addressbook-level2/pulls{/number}","milestones_url":"https://api.github.com/repos/nus-cs2103-AY1617S1/addressbook-level2/milestones{/number}","notifications_url":"https://api.github.com/repos/nus-cs2103-AY1617S1/addressbook-level2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nus-cs2103-AY1617S1/addressbook-level2/labels{/name}","releases_url":"https://api.github.com/repos/nus-cs2103-AY1617S1/addressbook-level2/releases{/id}","deployments_url":"https://api.github.com/repos/nus-cs2103-AY1617S1/addressbook-level2/deployments","created_at":"2016-08-25T11:09:03Z","updated_at":"2016-09-02T12:48:52Z","pushed_at":"2016-09-04T08:45:55Z","git_url":"git://github.com/nus-cs2103-AY1617S1/addressbook-level2.git","ssh_url":"git@github.com:nus-cs2103-AY1617S1/addressbook-level2.git","clone_url":"https://github.com/nus-cs2103-AY1617S1/addressbook-level2.git","svn_url":"https://github.com/nus-cs2103-AY1617S1/addressbook-level2","homepage":null,"size":17944,"stargazers_count":2,"watchers_count":2,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":248,"mirror_url":null,"open_issues_count":370,"forks":248,"open_issues":370,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/nus-cs2103-AY1617S1/addressbook-level2/pulls/646"},"html":{"href":"https://github.com/nus-cs2103-AY1617S1/addressbook-level2/pull/646"},"issue":{"href":"https://api.github.com/repos/nus-cs2103-AY1617S1/addressbook-level2/issues/646"},"comments":{"href":"https://api.github.com/repos/nus-cs2103-AY1617S1/addressbook-level2/issues/646/comments"},"review_comments":{"href":"https://api.github.com/repos/nus-cs2103-AY1617S1/addressbook-level2/pulls/646/comments"},"review_comment":{"href":"https://api.github.com/repos/nus-cs2103-AY1617S1/addressbook-level2/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/nus-cs2103-AY1617S1/addressbook-level2/pulls/646/commits"},"statuses":{"href":"https://api.github.com/repos/nus-cs2103-AY1617S1/addressbook-level2/statuses/d8dae4af75990efb00e422a649412c2c858df248"}}}}
{"actor":{"display_login":"cmkumar87"}}