package seedu.task.model.task;

import seedu.task.model.tag.UniqueTagList;

/**
 * A read-only immutable interface for a Task in the task manager.
 * Implementations should guarantee: details are present and not null, field
 * values are validated.
 */
public interface ReadOnlyTask {

    TaskName getTaskName();

    TaskDate getTaskDate();

    TaskTime getTaskStartTime();

    TaskTime getTaskEndTime();

    String getTaskDescription();

    TaskStatus getTaskStatus();

    // String getTaskPath();

    /**
     * The returned TagList is a deep copy of the internal TagList, changes on
     * the returned list will not affect the task's internal tags.
     */
    UniqueTagList getTags();

    /**
     * Returns true if both have the same state. (interfaces cannot override
     * .equals)
     */
    default boolean isSameStateAs(ReadOnlyTask other) {
	return other == this // short circuit if same object
		|| (other != null // this is first to avoid NPE below
			&& other.getTaskName() != null && other.getTaskName().equals(this.getTaskName()) // state
													 // checks
													 // here
													 // onwards
			&& other.getTaskDate() != null && other.getTaskDate().equals(this.getTaskDate())
			&& other.getTaskStartTime() != null && other.getTaskStartTime().equals(this.getTaskStartTime())
			&& other.getTaskEndTime() != null && other.getTaskEndTime().equals(this.getTaskEndTime()))
			&& other.getTaskDescription() != null
			&& other.getTaskDescription().equals(this.getTaskDescription()) && other.getTaskStatus() != null
			&& other.getTaskStatus().equals(this.getTaskStatus());
    }

    /**
     * Formats the task as text, showing all task details.
     */
    default String getAsText() {
	final StringBuilder builder = new StringBuilder();
	builder.append(getTaskName()).append(" Date: ").append(getTaskDate().toString()).append(" Start Time: ")
		.append(getTaskStartTime()).append(" End Time: ").append(getTaskEndTime())
		.append(" Description: " + getTaskDescription()).append(" Status: ").append(getTaskStatus());

	getTags().forEach(builder::append);
	return builder.toString();
    }

}

@@ -1613,16 +1613,36 @@
 ;%0A    %7D%0A
+//@@author A0146757R
 %0A    /**
@@ -2145,11 +2145,21 @@
 ;%0A    %7D%0A
+//@@author
 %0A%7D%0A

Update ReadOnlyTask.java