package seedu.address.model.task;

import seedu.address.model.tag.Tag;
import seedu.address.model.tag.UniqueTagList;

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

    Name getName();
    Date getDate();
    Time getTime();
    Tag getTag();
    Description getDescription();
    Venue getVenue();
    Priority getPriority();
    boolean isFavorite();
	boolean isFinished();

    /**
     * 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.getDate() != null? other.getDate().equals(this.getDate()): this.getDate() == null
                && other.getTime() != null? other.getTime().equals(this.getTime()): this.getTime() == null
                && other.getTag() != null? other.getTag().equals(this.getTag()): this.getTag() == null
                && other.getDescription() != null? other.equals(this.getDescription()): this.getDescription() == null
                && other.getVenue() != null? other.getVenue().equals(this.getVenue()): this.getVenue() == null
                && other.getPriority() != null? other.getPriority().equals(this.getPriority()): this.getPriority() == null
                && other.isFavorite()==this.isFavorite());*/
    }

    /**
     * Formats the person as text, showing all contact details.
     */
    default String getAsText() {
        final StringBuilder builder = new StringBuilder();
        builder.append(getName());
        if (getDate()!=null){
            builder.append("  Due Date:");
            builder.append(getDate());
        }
        return builder.toString();
    }


}

@@ -911,746 +911,14 @@
 rds%0A
-                /*&& other.getDate() != null? other.getDate().equals(this.getDate()): this.getDate() == null%0A                && other.getTime() != null? other.getTime().equals(this.getTime()): this.getTime() == null%0A                && other.getTag() != null? other.getTag().equals(this.getTag()): this.getTag() == null%0A                && other.getDescription() != null? other.equals(this.getDescription()): this.getDescription() == null%0A                && other.getVenue() != null? other.getVenue().equals(this.getVenue()): this.getVenue() == null%0A                && other.getPriority() != null? other.getPriority().equals(this.getPriority()): this.getPriority() == null%0A                && other.isFavorite()==this.isFavorite());*/%0A
     %7D%0A
+
 %0A   
@@ -1146,15 +1146,18 @@
 te()
+ 
 !=
+ 
 null)
+ 
 %7B%0A  
@@ -1246,16 +1246,796 @@
       %7D%0A
+        if (getTime() != null) %7B%0A            builder.append(%22  Time:%22);%0A            builder.append(getTime());%0A        %7D%0A        if (getDescription() != null) %7B%0A            builder.append(%22  Description:%22);%0A            builder.append(getDescription());%0A        %7D%0A        if (getTag() != null) %7B%0A            builder.append(%22  List:%22);%0A            builder.append(getTag());%0A        %7D%0A        if (getVenue() != null) %7B%0A            builder.append(%22  Venue:%22);%0A            builder.append(getVenue());%0A        %7D%0A        assert getPriority() != null;%0A        builder.append(%22  Priority:%22);%0A        builder.append(getPriority());%0A        if (isFavorite()) %7B%0A            builder.append(%22 favorite%22);%0A        %7D%0A        if (isFinished()) %7B%0A            builder.append(%22 finished%22);%0A        %7D%0A
         
@@ -2065,14 +2065,12 @@
 ();%0A
+
     %7D%0A
-%0A%0A
 %7D%0A

Change toString method in ReadOnlyTask