forked from nus-cs2103-AY2425S1/tp
-
Notifications
You must be signed in to change notification settings - Fork 5
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
7 changed files
with
89 additions
and
37 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
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
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
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
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
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
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 |
---|---|---|
|
@@ -20,8 +20,12 @@ | |
public class SampleDataUtil { | ||
|
||
public static final Remark EMPTY_REMARK = new Remark(""); | ||
|
||
/** | ||
* Returns an array of sample persons. | ||
*/ | ||
public static Person[] getSamplePersons() { | ||
return new Person[] { | ||
return new Person[]{ | ||
new Person(new Name("Alex Yeoh"), new Phone("87438807"), new Email("[email protected]"), | ||
new Address("Blk 30 Geylang Street 29, #06-40"), EMPTY_REMARK, | ||
getTagSet("friends")), | ||
|
@@ -43,7 +47,9 @@ public static Person[] getSamplePersons() { | |
}; | ||
} | ||
|
||
|
||
/** | ||
* Returns a sample {@code AddressBook} populated with sample persons. | ||
*/ | ||
public static ReadOnlyAddressBook getSampleAddressBook() { | ||
AddressBook sampleAb = new AddressBook(); | ||
for (Person samplePerson : getSamplePersons()) { | ||
|
@@ -54,11 +60,14 @@ public static ReadOnlyAddressBook getSampleAddressBook() { | |
|
||
/** | ||
* Returns a tag set containing the list of strings given. | ||
* | ||
* @param strings The tags to be added to the set. | ||
* @return A set of {@code Tag} objects. | ||
*/ | ||
public static Set<Tag> getTagSet(String... strings) { | ||
return Arrays.stream(strings) | ||
.map(Tag::new) | ||
.collect(Collectors.toSet()); | ||
} | ||
|
||
} | ||
|