package seedu.address.model.person;

public class Task {

}

@@ -34,27 +34,2039 @@
 n;%0A%0A
-public class Task %7B
+import java.util.Objects;%0A%0Aimport seedu.address.commons.util.CollectionUtil;%0Aimport seedu.address.model.tag.UniqueTagList;%0A%0A/**%0A * Represents a task in Hard2Do.%0A * Guarantees: details are present and not null, field values are validated.%0A */%0Apublic class Task implements ReadOnlyTask %7B%0A%0A    private Content content;%0A    private TaskDate date;%0A    private TaskTime time;%0A%0A    private UniqueTagList tags;%0A%0A    /**%0A     * Every field must be present and not null.%0A     */%0A    public Task(Content content, TaskDate date, TaskTime time, UniqueTagList tags) %7B%0A        assert !CollectionUtil.isAnyNull(content, date, time, tags);%0A        this.content = content;%0A        this.date = date;%0A        this.time = time;%0A        this.tags = new UniqueTagList(tags); // protect internal tags from changes in the arg list%0A    %7D%0A%0A    /**%0A     * Copy constructor.%0A     */%0A    public Task(ReadOnlyTask source) %7B%0A        this(source.getContent(), source.getDate(), source.getTime(), source.getTags());%0A    %7D%0A%0A    @Override%0A    public UniqueTagList getTags() %7B%0A        return new UniqueTagList(tags);%0A    %7D%0A%0A    /**%0A     * Replaces this task's tags with the tags in the argument tag list.%0A     */%0A    public void setTags(UniqueTagList replacement) %7B%0A        tags.setTags(replacement);%0A    %7D%0A%0A    @Override%0A    public boolean equals(Object other) %7B%0A        return other == this // short circuit if same object%0A                %7C%7C (other instanceof ReadOnlyTask // instanceof handles nulls%0A                && this.isSameStateAs((ReadOnlyTask) other));%0A    %7D%0A%0A    @Override%0A    public int hashCode() %7B%0A        // use this method for custom fields hashing instead of implementing your own%0A        return Objects.hash(content, date, time, tags);%0A    %7D%0A%0A    @Override%0A    public String toString() %7B%0A        return getAsText();%0A    %7D%0A%0A    @Override%0A    public Content getContent() %7B%0A        return content;%0A    %7D%0A%0A    @Override%0A    public TaskDate getDate() %7B%0A        return date;%0A    %7D%0A%0A    @Override%0A    public TaskTime getTime() %7B%0A        return time;%0A    %7D
 %0A%0A%7D%0A

add Task