forked from nus-cs2103-AY2122S1/tp
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
12 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -63,7 +63,7 @@ public class EditCommand extends Command { | |
+ PREFIX_PHONE + "91234567 " | ||
+ PREFIX_EMAIL + "[email protected]"; | ||
|
||
public static final String MESSAGE_EDIT_PERSON_SUCCESS = "Edited the following fields: \n" | ||
public static final String MESSAGE_EDIT_PERSON_SUCCESS = "Edited the following fields:" | ||
+ "%1$s\n" | ||
+ MESSAGE_PREDICATE_SHOW_ALL_PERSONS; | ||
public static final String MESSAGE_NOT_EDITED = "At least one field to edit must be provided."; | ||
|
@@ -328,23 +328,23 @@ && getNextOfKinAddress().equals(e.getNextOfKinAddress()) | |
@Override | ||
public String toString() { | ||
final StringBuilder builder = new StringBuilder(); | ||
getName().ifPresent(n -> builder.append("; Name: ").append(n)); | ||
getPhone().ifPresent(p -> builder.append("; Phone: ").append(p)); | ||
getEmail().ifPresent(e -> builder.append("; Email: ").append(e)); | ||
getCaseNumber().ifPresent(cn -> builder.append("; Case Number: ").append(cn)); | ||
getHomeAddress().ifPresent(ha -> builder.append("; Home Address: ").append(ha)); | ||
getName().ifPresent(n -> builder.append("\nName: ").append(n)); | ||
getPhone().ifPresent(p -> builder.append("\nPhone: ").append(p)); | ||
getEmail().ifPresent(e -> builder.append("\nEmail: ").append(e)); | ||
getCaseNumber().ifPresent(cn -> builder.append("\nCase Number: ").append(cn)); | ||
getHomeAddress().ifPresent(ha -> builder.append("\nHome Address: ").append(ha)); | ||
getWorkAddress().flatMap(wa -> wa.value) | ||
.ifPresent(wa -> builder.append("; Work Address: ").append(wa)); | ||
.ifPresent(wa -> builder.append("\nWork Address: ").append(wa)); | ||
getQuarantineAddress().flatMap(qa -> qa.value) | ||
.ifPresent(qa -> builder.append("; Quarantine Address: ").append(qa)); | ||
.ifPresent(qa -> builder.append("\nQuarantine Address: ").append(qa)); | ||
getShnPeriod().flatMap(sh -> sh.value) | ||
.ifPresent(sh -> builder.append("; SHN Period: ").append(sh)); | ||
.ifPresent(sh -> builder.append("\nSHN Period: ").append(sh)); | ||
getNextOfKinName().flatMap(kn -> kn.value) | ||
.ifPresent(kn -> builder.append("; Next-of-Kin's Name: ").append(kn)); | ||
.ifPresent(kn -> builder.append("\nNext-of-Kin's Name: ").append(kn)); | ||
getNextOfKinPhone().flatMap(kp -> kp.value) | ||
.ifPresent(kp -> builder.append("; Next-of-Kin's Phone: ").append(kp)); | ||
.ifPresent(kp -> builder.append("\nNext-of-Kin's Phone: ").append(kp)); | ||
getNextOfKinAddress().flatMap(ka -> ka.value) | ||
.ifPresent(ka -> builder.append("; Next-of-Kin's Address: ").append(ka)); | ||
.ifPresent(ka -> builder.append("\nNext-of-Kin's Address: ").append(ka)); | ||
|
||
return builder.toString(); | ||
} | ||
|