forked from nus-cs2103-AY1718S2/addressbook-level4
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #120 from Kyomian/new
Added collated folder and removed AppInterface.png
- Loading branch information
Showing
11 changed files
with
4,681 additions
and
1 deletion.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,68 @@ | ||
# YuanQLLer | ||
###### \java\seedu\address\model\util\SampleDataUtil.java | ||
``` java | ||
/** | ||
* Contains utility methods for populating {@code DeskBoard} with sample data. | ||
*/ | ||
public class SampleDataUtil { | ||
public static Activity[] getSampleActivity() { | ||
return new Activity[] { | ||
new Task(new Name("Task 1"), new DateTime("01/01/2018 23:59"), | ||
new Remark("Submit through ivle"), getTagSet("Completed")), | ||
new Task (new Name("Task 2"), new DateTime("02/02/2018 23:59"), | ||
new Remark("Submit through ivle"), getTagSet("Completed")), | ||
new Task (new Name("Task 3"), new DateTime("03/03/2018 23:59"), | ||
new Remark("Submit through ivle"), getTagSet("Completed")), | ||
new Task (new Name("Task 4"), new DateTime("04/04/2018 23:59"), | ||
new Remark("Submit through ivle"), getTagSet("Uncompleted")), | ||
new Task (new Name("Task 5"), new DateTime("05/05/2018 23:59"), | ||
new Remark("Submit through ivle"), getTagSet("Unompleted")), | ||
new Task (new Name("Task 6"), new DateTime("06/06/2018 23:59"), | ||
new Remark("Submit through ivle"), getTagSet("Completed")), | ||
new Event(new Name("Event 1"), new DateTime("01/01/2018 07:00"), | ||
new DateTime("01/01/2018 08:00"), new Location("TBC"), new Remark("Remark"), | ||
getTagSet("Finished")), | ||
new Event (new Name("Event 2"), new DateTime("02/02/2018 07:00"), | ||
new DateTime("02/02/2018 08:00"), new Location("TBC"), new Remark("Remark"), | ||
getTagSet("Finished")), | ||
new Event (new Name("Event 3"), new DateTime("03/03/2018 07:00"), | ||
new DateTime("03/03/2018 08:00"), new Location("TBC"), new Remark("Remark"), | ||
getTagSet("Cancelled")), | ||
new Event (new Name("Event 4"), new DateTime("04/04/2018 07:00"), | ||
new DateTime("04/04/2018 08:00"), new Location("TBC"), new Remark("Remark"), | ||
getTagSet("Important")), | ||
new Event (new Name("Event 5"), new DateTime("05/05/2018 07:00"), | ||
new DateTime("05/05/2018 08:00"), new Location("TBC"), new Remark("Remark"), | ||
getTagSet("Important")), | ||
new Event (new Name("Event 6"), new DateTime("06/06/2018 07:00"), | ||
new DateTime("06/06/2018 08:00"), new Location("TBC"), new Remark("Remark"), | ||
getTagSet("Compulsory")) | ||
}; | ||
} | ||
|
||
public static ReadOnlyDeskBoard getSampleDeskBoard() { | ||
try { | ||
DeskBoard sampleAb = new DeskBoard(); | ||
for (Activity sampleActivity : getSampleActivity()) { | ||
sampleAb.addActivity(sampleActivity); | ||
} | ||
return sampleAb; | ||
} catch (DuplicateActivityException e) { | ||
throw new AssertionError("sample data cannot contain duplicate activities", e); | ||
} | ||
} | ||
|
||
/** | ||
* Returns a tag set containing the list of strings given. | ||
*/ | ||
public static Set<Tag> getTagSet(String ... strings) { | ||
HashSet<Tag> tags = new HashSet<>(); | ||
for (String s : strings) { | ||
tags.add(new Tag(s)); | ||
} | ||
|
||
return tags; | ||
} | ||
|
||
} | ||
``` |
Oops, something went wrong.