package seedu.task.model;

import java.util.Set;

import seedu.task.commons.core.UnmodifiableObservableList;
import seedu.task.model.task.ReadOnlyTask;
import seedu.task.model.task.Task;
import seedu.task.model.task.UniqueTaskList;
import seedu.task.model.task.UniqueTaskList.DuplicateTaskException;

/**
 * The API of the Model component.
 */
public interface Model {
    /** Clears existing backing model and replaces with the provided new data. */
    void resetData(ReadOnlyTaskList newData);

    /** Returns the TaskList */
    ReadOnlyTaskList getTaskList();

    /** Deletes the given person. */
    void deleteTask(ReadOnlyTask target) throws UniqueTaskList.TaskNotFoundException;

    /** Adds the given person */
    void addTask(Task person) throws UniqueTaskList.DuplicateTaskException;

    /**
     * Updates the person located at {@code filteredPersonListIndex} with {@code editedPerson}.
     *
     * @throws DuplicateTaskException if updating the person's details causes the person to be equivalent to
     *      another existing person in the list.
     * @throws IndexOutOfBoundsException if {@code filteredPersonListIndex} < 0 or >= the size of the filtered list.
     */
    void updateTask(int filteredPersonListIndex, ReadOnlyTask editedPerson)
            throws UniqueTaskList.DuplicateTaskException;

    /** Returns the filtered person list as an {@code UnmodifiableObservableList<ReadOnlyPerson>} */
    UnmodifiableObservableList<ReadOnlyTask> getFilteredTaskList();

    /** Updates the filter of the filtered person list to show all persons */
    void updateFilteredListToShowAll();

    /** Updates the filter of the filtered person list to filter by the given keywords*/
    void updateFilteredTaskList(Set<String> keywords);

}

@@ -586,22 +586,20 @@
 e given 
-person
+task
 . */%0A   
@@ -705,22 +705,20 @@
 e given 
-person
+task
  */%0A    
@@ -735,22 +735,20 @@
 sk(Task 
-person
+task
 ) throws
@@ -815,22 +815,20 @@
 tes the 
-person
+task
  located
@@ -838,38 +838,36 @@
  %7B@code filtered
-Person
+Task
 ListIndex%7D with 
@@ -879,22 +879,20 @@
 e edited
-Person
+Task
 %7D.%0A     
@@ -947,22 +947,20 @@
 ing the 
-person
+task
 's detai
@@ -973,22 +973,20 @@
 ses the 
-person
+task
  to be e
@@ -1027,22 +1027,20 @@
 xisting 
-person
+task
  in the 
@@ -1096,38 +1096,36 @@
  %7B@code filtered
-Person
+Task
 ListIndex%7D %3C 0 o
@@ -1200,22 +1200,20 @@
 filtered
-Person
+Task
 ListInde
@@ -1234,22 +1234,20 @@
 k edited
-Person
+Task
 )%0A      
@@ -1324,30 +1324,28 @@
 he filtered 
-person
+task
  list as an 
@@ -1390,14 +1390,12 @@
 Only
-Person
+Task
 %3E%7D *
@@ -1500,38 +1500,36 @@
 of the filtered 
-person
+task
  list to show al
@@ -1530,22 +1530,20 @@
 how all 
-person
+task
 s */%0A   
@@ -1627,14 +1627,12 @@
 red 
-person
+task
  lis

Refactor Model