package seedu.tasklist.model.task;

import java.util.Objects;

import seedu.tasklist.commons.util.CollectionUtil;
import seedu.tasklist.model.tag.UniqueTagList;

/**
 * Represents a Task in the task list.
 * Guarantees: details are present and not null, field values are validated.
 */
public class Task implements ReadOnlyTask {

    private Name name;
    private Comment comment;
    private Priority priority;
    private Status status; 

    private UniqueTagList tags;
    
   
    /**
     * Every field must be present and not null.
     */
    public Task(Name name, Comment comment, UniqueTagList tags) {
        assert !CollectionUtil.isAnyNull(name, comment, tags);
        this.name = name;
        this.comment = comment;
        this.tags = new UniqueTagList(tags); // protect internal tags from changes in the arg list
    }

    /**
     * Creates a copy of the given ReadOnlyTask.
     */
    public Task(ReadOnlyTask source) {
        this(source.getName(), source.getComment(), source.getTags());
    }

    public void setName(Name name) {
        assert name != null;
        this.name = name;
    }

    @Override
    public Name getName() {
        return name;
    }


    public void setComment(Comment comment) {
        assert comment != null;
        this.comment = comment;
    }

    @Override
    public Comment getComment() {
        return comment;
    }

    @Override
    public UniqueTagList getTags() {
        return new UniqueTagList(tags);
    }

    /**
     * Replaces this person's tags with the tags in the argument tag list.
     */
    public void setTags(UniqueTagList replacement) {
        tags.setTags(replacement);
    }

    /**
     * Updates this person with the details of {@code replacement}.
     */
    public void resetData(ReadOnlyTask replacement) {
        assert replacement != null;

        this.setName(replacement.getName());
        this.setComment(replacement.getComment());
        this.setTags(replacement.getTags());
    }

    @Override
    public boolean equals(Object other) {
        return other == this // short circuit if same object
                || (other instanceof ReadOnlyTask // instanceof handles nulls
                && this.isSameStateAs((ReadOnlyTask) other));
    }

    @Override
    public int hashCode() {
        // use this method for custom fields hashing instead of implementing your own
        return Objects.hash(name, comment, tags);
    }

    @Override
    public String toString() {
        return getAsText();
    }

    @Override
    public Priority getPriority() {
        return priority;
    }

    @Override
    public Status getStatus() {
        return status;
    }

}

@@ -585,16 +585,50 @@
 comment,
+ Priority priority, Status status,
  UniqueT
@@ -689,32 +689,50 @@
 l(name, comment,
+ priority, status,
  tags);%0A        
@@ -777,24 +777,88 @@
  = comment;%0A
+        this.priority = priority;%0A        this.status = status;%0A
         this
@@ -1106,16 +1106,58 @@
 mment(),
+ source.getPriority(), source.getStatus(),
  source.
@@ -1629,32 +1629,434 @@
 ist(tags);%0A    %7D
+%0A    %0A    public void setPriority(Priority priority)%7B%0A        assert priority != null;%0A        this.priority = priority;%0A    %7D%0A    %0A    @Override%0A    public Priority getPriority() %7B%0A        return priority;%0A    %7D%0A    %0A    public void setStatus(Status status)%7B%0A        assert status != null;%0A        this.status = status;%0A    %7D%0A%0A    @Override%0A    public Status getStatus() %7B%0A        return status;%0A    %7D
 %0A%0A    /**%0A     *
@@ -3083,164 +3083,6 @@
  %7D%0A%0A
-    @Override%0A    public Priority getPriority() %7B%0A        return priority;%0A    %7D%0A%0A    @Override%0A    public Status getStatus() %7B%0A        return status;%0A    %7D%0A%0A
 %7D%0A

Update Task.java to include priority and status