package seedu.ezdo.model.todo;

import seedu.ezdo.model.tag.UniqueTagList;

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

    Name getName();
    Priority getPriority();
    TaskDate getStartDate();
    TaskDate getDueDate();
    boolean getDone();

    /**
     * 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.getName().equals(this.getName()) // state checks here onwards
                && other.getPriority().equals(this.getPriority())
                && other.getStartDate().equals(this.getStartDate()))
                && other.getDueDate().equals(this.getDueDate());
    }
  //@@author A0139248X
    /**
     * Formats the task as text, showing all contact details.
     */
    default String getAsText() {
        final StringBuilder builder = new StringBuilder();
        builder.append("Task: ").append(getName());
        if (!getPriority().toString().isEmpty()) {
            builder.append(" Priority: ").append(getPriority());
        }
        if (!getStartDate().toString().isEmpty()) {
            builder.append(" StartDate: ").append(getStartDate());
        }
        if (!getDueDate().toString().isEmpty()) {
            builder.append(" DueDate: ").append(getDueDate());
        }
        if (!getTags().toSet().isEmpty()) {
            builder.append(" Tags: ");
            getTags().forEach(builder::append);
        }
        return builder.toString();
    }

}

@@ -127,19 +127,16 @@
 in ezDo.
-%0A *
  Impleme
@@ -150,16 +150,19 @@
 s should
+%0A *
  guarant
@@ -280,24 +280,25 @@
  getName();%0A
+%0A
     Priority
@@ -309,24 +309,25 @@
 Priority();%0A
+%0A
     TaskDate
@@ -339,24 +339,25 @@
 tartDate();%0A
+%0A
     TaskDate
@@ -367,24 +367,48 @@
 tDueDate();%0A
+%0A    Recur getRecur();%0A%0A
     boolean 
@@ -494,23 +494,16 @@
 TagList,
-%0A     *
  changes
@@ -505,16 +505,23 @@
 anges on
+%0A     *
  the ret
@@ -695,16 +695,23 @@
 override
+%0A     *
  .equals
@@ -915,32 +915,40 @@
                 
+     
+   
 && other.getName
@@ -985,20 +985,158 @@
 tate
- checks here
+%0A                                                                  // checks here%0A                                                                  //
  onw
@@ -1140,16 +1140,24 @@
 onwards%0A
+        
         
@@ -1222,32 +1222,40 @@
                 
+  
+      
 && other.getStar
@@ -1299,32 +1299,40 @@
                 
+       
+ 
 && other.getDueD
@@ -1370,20 +1370,24 @@
 ;%0A    %7D%0A
+%0A  
   //
+ 
 @@author
@@ -1454,15 +1454,12 @@
 all 
-contact
+task
  det
@@ -1986,32 +1986,149 @@
 e());%0A        %7D%0A
+        if (!getRecur().toString().isEmpty()) %7B%0A            builder.append(%22 Recur: %22).append(getRecur());%0A        %7D%0A
         if (!get

Update ReadOnlyTask with recur field