diff --git a/src/main/java/seedu/address/model/util/SampleDataUtil.java b/src/main/java/seedu/address/model/util/SampleDataUtil.java index 7bfcdf46b1a..c5b314ecc7c 100644 --- a/src/main/java/seedu/address/model/util/SampleDataUtil.java +++ b/src/main/java/seedu/address/model/util/SampleDataUtil.java @@ -3,6 +3,7 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.HashSet; +import java.util.List; import java.util.Set; import java.util.stream.Collectors; @@ -60,10 +61,10 @@ public static Client[] getSampleClients() { public static Project[] getSampleProjects() { return new Project[] { - new Project(new Name("CodeContact"), new Description("test"), getDeadlineSet("")), - new Project(new Name("TeamTrekker"), new Description("test"), getDeadlineSet("")), - new Project(new Name("Oribital"), new Description("test"), getDeadlineSet("")), - new Project(new Name("Appollo"), new Description("test"), getDeadlineSet("")), + new Project(new Name("CodeContact"), new Description("test"), getDeadlineList("")), + new Project(new Name("TeamTrekker"), new Description("test"), getDeadlineList("")), + new Project(new Name("Oribital"), new Description("test"), getDeadlineList("")), + new Project(new Name("Appollo"), new Description("test"), getDeadlineList("")), }; } @@ -83,9 +84,11 @@ public static Set getProjectSet(String... strings) { .collect(Collectors.toSet()); } - public static Set getDeadlineSet(String... deadlines) { - return Arrays.stream(deadlines) - .map(t->new Deadline(t)) - .collect(Collectors.toSet()); + public static List getDeadlineList(String... deadlines) { + List deadlineList = new ArrayList<>(); + for (String s : deadlines) { + deadlineList.add(new Deadline(s, deadlineList.size() + 1)); + } + return deadlineList; } }