{"action":"created","comment":{"url":"https://api.github.com/repos/nus-cs2103-AY1617S1/addressbook-level2/pulls/comments/78271053","id":78271053,"diff_hunk":"@@ -0,0 +1,51 @@\n+package seedu.addressbook.data.person;\n+\n+import seedu.addressbook.data.exception.IllegalValueException;\n+\n+/**\n+ * Represents a Person's contact in the address book.\n+ * Guarantees: immutable; is valid as declared in {@link #isValidContact(String)}\n+ */\n+public class Contact {\n+\t\n+\tpublic static final String EXAMPLE = \"123, some street\";\n+    public static final String MESSAGE_CONTACT_CONSTRAINTS = \"Person contact can be in any format\";\n+    public static final String CONTACT_VALIDATION_REGEX = \".+\";\n+    \n+\tpublic final String value;\n+    protected boolean isPrivate;\n+    \n+\tpublic Contact(String contactDetails, boolean isPrivate) throws IllegalValueException {\n+\t\tthis.value = contactDetails;\n+\t\tthis.isPrivate = isPrivate;\n+\t\tif (!isValidContact(contactDetails, CONTACT_VALIDATION_REGEX)) {\n+            throw new IllegalValueException(MESSAGE_CONTACT_CONSTRAINTS);\n+        }\n+\t}\n+\t\n+\tpublic static boolean isValidContact(String test, String validationRegex) {\n+        return test.matches(validationRegex);\n+    }\n+\t\n+\t@Override\n+    public String toString() {\n+        return value;\n+    }\n+\n+    @Override\n+    public boolean equals(Object other) {\n+        return other == this // short circuit if same object\n+                || (other instanceof Contact // instanceof handles nulls\n+                && this.value.equals(((Contact) other).value)); // state check\n+    }","path":"src/seedu/addressbook/data/person/Contact.java","position":40,"original_position":40,"commit_id":"f1a02216a15c57fa6efea98719435ee71e31e32b","original_commit_id":"f1a02216a15c57fa6efea98719435ee71e31e32b","user":{"login":"damithc","id":1673303,"avatar_url":"https://avatars.githubusercontent.com/u/1673303?v=3","gravatar_id":"","url":"https://api.github.com/users/damithc","html_url":"https://github.com/damithc","followers_url":"https://api.github.com/users/damithc/followers","following_url":"https://api.github.com/users/damithc/following{/other_user}","gists_url":"https://api.github.com/users/damithc/gists{/gist_id}","starred_url":"https://api.github.com/users/damithc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/damithc/subscriptions","organizations_url":"https://api.github.com/users/damithc/orgs","repos_url":"https://api.github.com/users/damithc/repos","events_url":"https://api.github.com/users/damithc/events{/privacy}","received_events_url":"https://api.github.com/users/damithc/received_events","type":"User","site_admin":false},"body":"This is fine, but note that now an Email and Address having the same value will be considered equal even if they are of different types.","created_at":"2016-09-10T04:35:38Z","updated_at":"2016-09-10T04:35:38Z","html_url":"https://github.com/nus-cs2103-AY1617S1/addressbook-level2/pull/1205#discussion_r78271053","pull_request_url":"https://api.github.com/repos/nus-cs2103-AY1617S1/addressbook-level2/pulls/1205","_links":{"self":{"href":"https://api.github.com/repos/nus-cs2103-AY1617S1/addressbook-level2/pulls/comments/78271053"},"html":{"href":"https://github.com/nus-cs2103-AY1617S1/addressbook-level2/pull/1205#discussion_r78271053"},"pull_request":{"href":"https://api.github.com/repos/nus-cs2103-AY1617S1/addressbook-level2/pulls/1205"}}},"pull_request":{"url":"https://api.github.com/repos/nus-cs2103-AY1617S1/addressbook-level2/pulls/1205","id":84231005,"html_url":"https://github.com/nus-cs2103-AY1617S1/addressbook-level2/pull/1205","diff_url":"https://github.com/nus-cs2103-AY1617S1/addressbook-level2/pull/1205.diff","patch_url":"https://github.com/nus-cs2103-AY1617S1/addressbook-level2/pull/1205.patch","issue_url":"https://api.github.com/repos/nus-cs2103-AY1617S1/addressbook-level2/issues/1205","number":1205,"state":"open","locked":false,"title":"[T4A3][W14-B4]TanJunAn","user":{"login":"yamidark","id":18352498,"avatar_url":"https://avatars.githubusercontent.com/u/18352498?v=3","gravatar_id":"","url":"https://api.github.com/users/yamidark","html_url":"https://github.com/yamidark","followers_url":"https://api.github.com/users/yamidark/followers","following_url":"https://api.github.com/users/yamidark/following{/other_user}","gists_url":"https://api.github.com/users/yamidark/gists{/gist_id}","starred_url":"https://api.github.com/users/yamidark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yamidark/subscriptions","organizations_url":"https://api.github.com/users/yamidark/orgs","repos_url":"https://api.github.com/users/yamidark/repos","events_url":"https://api.github.com/users/yamidark/events{/privacy}","received_events_url":"https://api.github.com/users/yamidark/received_events","type":"User","site_admin":false},"body":"Ready for review","created_at":"2016-09-07T03:25:39Z","updated_at":"2016-09-10T04:35:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1e25d449c6946c0280aaad8f80b77342cd304b5a","assignee":{"login":"damithc","id":1673303,"avatar_url":"https://avatars.githubusercontent.com/u/1673303?v=3","gravatar_id":"","url":"https://api.github.com/users/damithc","html_url":"https://github.com/damithc","followers_url":"https://api.github.com/users/damithc/followers","following_url":"https://api.github.com/users/damithc/following{/other_user}","gists_url":"https://api.github.com/users/damithc/gists{/gist_id}","starred_url":"https://api.github.com/users/damithc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/damithc/subscriptions","organizations_url":"https://api.github.com/users/damithc/orgs","repos_url":"https://api.github.com/users/damithc/repos","events_url":"https://api.github.com/users/damithc/events{/privacy}","received_events_url":"https://api.github.com/users/damithc/received_events","type":"User","site_admin":false},"assignees":[{"login":"damithc","id":1673303,"avatar_url":"https://avatars.githubusercontent.com/u/1673303?v=3","gravatar_id":"","url":"https://api.github.com/users/damithc","html_url":"https://github.com/damithc","followers_url":"https://api.github.com/users/damithc/followers","following_url":"https://api.github.com/users/damithc/following{/other_user}","gists_url":"https://api.github.com/users/damithc/gists{/gist_id}","starred_url":"https://api.github.com/users/damithc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/damithc/subscriptions","organizations_url":"https://api.github.com/users/damithc/orgs","repos_url":"https://api.github.com/users/damithc/repos","events_url":"https://api.github.com/users/damithc/events{/privacy}","received_events_url":"https://api.github.com/users/damithc/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/nus-cs2103-AY1617S1/addressbook-level2/pulls/1205/commits","review_comments_url":"https://api.github.com/repos/nus-cs2103-AY1617S1/addressbook-level2/pulls/1205/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/1205/comments","statuses_url":"https://api.github.com/repos/nus-cs2103-AY1617S1/addressbook-level2/statuses/f1a02216a15c57fa6efea98719435ee71e31e32b","head":{"label":"yamidark:T4A3","ref":"T4A3","sha":"f1a02216a15c57fa6efea98719435ee71e31e32b","user":{"login":"yamidark","id":18352498,"avatar_url":"https://avatars.githubusercontent.com/u/18352498?v=3","gravatar_id":"","url":"https://api.github.com/users/yamidark","html_url":"https://github.com/yamidark","followers_url":"https://api.github.com/users/yamidark/followers","following_url":"https://api.github.com/users/yamidark/following{/other_user}","gists_url":"https://api.github.com/users/yamidark/gists{/gist_id}","starred_url":"https://api.github.com/users/yamidark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yamidark/subscriptions","organizations_url":"https://api.github.com/users/yamidark/orgs","repos_url":"https://api.github.com/users/yamidark/repos","events_url":"https://api.github.com/users/yamidark/events{/privacy}","received_events_url":"https://api.github.com/users/yamidark/received_events","type":"User","site_admin":false},"repo":{"id":66845644,"name":"addressbook-level2","full_name":"yamidark/addressbook-level2","owner":{"login":"yamidark","id":18352498,"avatar_url":"https://avatars.githubusercontent.com/u/18352498?v=3","gravatar_id":"","url":"https://api.github.com/users/yamidark","html_url":"https://github.com/yamidark","followers_url":"https://api.github.com/users/yamidark/followers","following_url":"https://api.github.com/users/yamidark/following{/other_user}","gists_url":"https://api.github.com/users/yamidark/gists{/gist_id}","starred_url":"https://api.github.com/users/yamidark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yamidark/subscriptions","organizations_url":"https://api.github.com/users/yamidark/orgs","repos_url":"https://api.github.com/users/yamidark/repos","events_url":"https://api.github.com/users/yamidark/events{/privacy}","received_events_url":"https://api.github.com/users/yamidark/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/yamidark/addressbook-level2","description":"A Java sample application for students. An AddressBook application that uses OOP basics.","fork":true,"url":"https://api.github.com/repos/yamidark/addressbook-level2","forks_url":"https://api.github.com/repos/yamidark/addressbook-level2/forks","keys_url":"https://api.github.com/repos/yamidark/addressbook-level2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yamidark/addressbook-level2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yamidark/addressbook-level2/teams","hooks_url":"https://api.github.com/repos/yamidark/addressbook-level2/hooks","issue_events_url":"https://api.github.com/repos/yamidark/addressbook-level2/issues/events{/number}","events_url":"https://api.github.com/repos/yamidark/addressbook-level2/events","assignees_url":"https://api.github.com/repos/yamidark/addressbook-level2/assignees{/user}","branches_url":"https://api.github.com/repos/yamidark/addressbook-level2/branches{/branch}","tags_url":"https://api.github.com/repos/yamidark/addressbook-level2/tags","blobs_url":"https://api.github.com/repos/yamidark/addressbook-level2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yamidark/addressbook-level2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yamidark/addressbook-level2/git/refs{/sha}","trees_url":"https://api.github.com/repos/yamidark/addressbook-level2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yamidark/addressbook-level2/statuses/{sha}","languages_url":"https://api.github.com/repos/yamidark/addressbook-level2/languages","stargazers_url":"https://api.github.com/repos/yamidark/addressbook-level2/stargazers","contributors_url":"https://api.github.com/repos/yamidark/addressbook-level2/contributors","subscribers_url":"https://api.github.com/repos/yamidark/addressbook-level2/subscribers","subscription_url":"https://api.github.com/repos/yamidark/addressbook-level2/subscription","commits_url":"https://api.github.com/repos/yamidark/addressbook-level2/commits{/sha}","git_commits_url":"https://api.github.com/repos/yamidark/addressbook-level2/git/commits{/sha}","comments_url":"https://api.github.com/repos/yamidark/addressbook-level2/comments{/number}","issue_comment_url":"https://api.github.com/repos/yamidark/addressbook-level2/issues/comments{/number}","contents_url":"https://api.github.com/repos/yamidark/addressbook-level2/contents/{+path}","compare_url":"https://api.github.com/repos/yamidark/addressbook-level2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yamidark/addressbook-level2/merges","archive_url":"https://api.github.com/repos/yamidark/addressbook-level2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yamidark/addressbook-level2/downloads","issues_url":"https://api.github.com/repos/yamidark/addressbook-level2/issues{/number}","pulls_url":"https://api.github.com/repos/yamidark/addressbook-level2/pulls{/number}","milestones_url":"https://api.github.com/repos/yamidark/addressbook-level2/milestones{/number}","notifications_url":"https://api.github.com/repos/yamidark/addressbook-level2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yamidark/addressbook-level2/labels{/name}","releases_url":"https://api.github.com/repos/yamidark/addressbook-level2/releases{/id}","deployments_url":"https://api.github.com/repos/yamidark/addressbook-level2/deployments","created_at":"2016-08-29T13:23:33Z","updated_at":"2016-08-29T13:23:34Z","pushed_at":"2016-09-06T18:10:54Z","git_url":"git://github.com/yamidark/addressbook-level2.git","ssh_url":"git@github.com:yamidark/addressbook-level2.git","clone_url":"https://github.com/yamidark/addressbook-level2.git","svn_url":"https://github.com/yamidark/addressbook-level2","homepage":null,"size":3013,"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":"46169956515bda6c75ca0b5851b5dab26581be3a","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-08T17:36:33Z","pushed_at":"2016-09-10T02:42:26Z","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":33348,"stargazers_count":3,"watchers_count":3,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":256,"mirror_url":null,"open_issues_count":795,"forks":256,"open_issues":795,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/nus-cs2103-AY1617S1/addressbook-level2/pulls/1205"},"html":{"href":"https://github.com/nus-cs2103-AY1617S1/addressbook-level2/pull/1205"},"issue":{"href":"https://api.github.com/repos/nus-cs2103-AY1617S1/addressbook-level2/issues/1205"},"comments":{"href":"https://api.github.com/repos/nus-cs2103-AY1617S1/addressbook-level2/issues/1205/comments"},"review_comments":{"href":"https://api.github.com/repos/nus-cs2103-AY1617S1/addressbook-level2/pulls/1205/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/1205/commits"},"statuses":{"href":"https://api.github.com/repos/nus-cs2103-AY1617S1/addressbook-level2/statuses/f1a02216a15c57fa6efea98719435ee71e31e32b"}}}}
{"actor":{"display_login":"damithc"}}