package seedu.tasklist.model.task;

import java.util.Date;
import java.util.Objects;

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

/**
* Represents a Task with start and end date in the task list.
* Guarantees: details are present and not null, field values are validated.
*/
public class EventTask extends Task implements ReadOnlyEventTask {
    
    private Name name;
    private Comment comment;
    private Priority priority;
    private Status status; 
    private Date startDate;
    private Date endDate; 
    
    private UniqueTagList tags; 

    public EventTask(Name name, Comment comment, Priority priority, Status status, Date startDate, Date endDate, UniqueTagList tags) {
        super(name, comment, priority, status, tags);
        assert !CollectionUtil.isAnyNull(name, startDate, endDate, status);
        this.name = name;
        this.comment = comment;
        this.priority = priority;
        this.status = status;
        this.startDate = startDate;
        this.endDate = endDate;
        this.tags = new UniqueTagList(tags); // protect internal tags from changes in the arg list
        
    }
    
    /**
     * Creates a copy of the given ReadOnlyEventTask.
     */
    public EventTask(ReadOnlyEventTask source) {
        this(source.getName(), source.getComment(), source.getPriority(), source.getStatus(), source.getStartDate(), source.getEndDate(), source.getTags());
    }
    
    public void setStartDate(Date startDate){
        assert startDate != null;
        this.startDate = startDate;
    }
    
    public void setEndDate(Date endDate){
        assert endDate != null;
        this.endDate = endDate;
    }
    
    public void setPriority(Priority priority){
        assert priority != null;
        this.priority = priority;
    }
    
    @Override
    public Priority getPriority() {
        return null;
    }
    
    public void setStatus(Status status){
        assert status != null;
        this.status = status;
    }

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

    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 Date getStartDate() {
        return startDate;
    }

    @Override
    public Date getEndDate() {
        return endDate;
    }

    @Override
    public UniqueTagList getTags() {
        return 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(ReadOnlyEventTask replacement) {
        assert replacement != null;

        this.setName(replacement.getName());
        this.setComment(replacement.getComment());
        this.setPriority(replacement.getPriority());
        this.setStatus(replacement.getStatus());
        this.setStartDate(replacement.getStartDate());
        this.setEndDate(replacement.getEndDate());
        this.setTags(replacement.getTags());
    }
    
    @Override
    public boolean equals(Object other) {
        return other == this // short circuit if same object
                || (other instanceof ReadOnlyEventTask // instanceof handles nulls
                && this.isSameStateAs((ReadOnlyEventTask) other));
    }

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

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

}

Add EventTask.java