package seedu.jimi.model.task;

import seedu.jimi.model.tag.UniqueTagList;

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

    Name getName();
    boolean isCompleted();
    String getAsText();

    /**
     * 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();
    
    
    /**
     * Replaces this task's tags with the tags in the argument tag list.
     */
    public void setTags(UniqueTagList replacement); 
    

    /**
     * Returns true if both have the same state. (interfaces cannot override .equals)
     */
    boolean isSameStateAs(ReadOnlyTask other);

    /**
     * Returns a string representation of this Task's tags
     */
    default String tagsString() {
        final StringBuffer buffer = new StringBuffer();
        final String separator = ", ";
        getTags().forEach(tag -> buffer.append(tag).append(separator));
        if (buffer.length() == 0) {
            return "";
        } else {
            return buffer.substring(0, buffer.length() - separator.length());
        }
    }
    
    

}
@@ -25,16 +25,54 @@
 .task;%0A%0A
+import seedu.jimi.model.tag.Priority;%0A
 import s
@@ -388,16 +388,44 @@
 sText();
+%0A    Priority getPriority();
 %0A%0A    /*

Implement Priority in ReadOnlyTask