-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[T4A1][T01-T1]Cherry Goh #111
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
* Represents a Person's address in the address book. | ||
* Guarantees: immutable; is valid as declared in {@link #isValidAddress(String)} | ||
*/ | ||
public class Address { | ||
public class Address implements Printable{ | ||
|
||
public static final String EXAMPLE = "123, some street"; | ||
public static final String MESSAGE_ADDRESS_CONSTRAINTS = "Person addresses can be in any format"; | ||
|
@@ -56,4 +56,9 @@ public int hashCode() { | |
public boolean isPrivate() { | ||
return isPrivate; | ||
} | ||
|
||
public String getPrintableString() { | ||
// TODO Auto-generated method stub | ||
return value; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Indentation problem here? Our coding standard requires you to use 4 spaces instead of tabs. You can configure Eclipse to convert tabs to spaces automatically. |
||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
* Represents a Person's email in the address book. | ||
* Guarantees: immutable; is valid as declared in {@link #isValidEmail(String)} | ||
*/ | ||
public class Email { | ||
public class Email implements Printable { | ||
|
||
public static final String EXAMPLE = "[email protected]"; | ||
public static final String MESSAGE_EMAIL_CONSTRAINTS = | ||
|
@@ -58,4 +58,10 @@ public int hashCode() { | |
public boolean isPrivate() { | ||
return isPrivate; | ||
} | ||
|
||
|
||
public String getPrintableString() { | ||
// TODO Auto-generated method stub | ||
return value; | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -83,5 +83,6 @@ public int hashCode() { | |
public String toString() { | ||
return getAsTextShowAll(); | ||
} | ||
|
||
|
||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package seedu.addressbook.data.person; | ||
|
||
public interface Printable { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Missing header comment. All non-trivial classes and methods should have javadoc format header comments. |
||
|
||
String getPrintableString(); | ||
|
||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove default comments to ensure that the code is clean and easy to read.