package seedu.address.model;

import java.util.Set;

import seedu.address.commons.core.UnmodifiableObservableList;
import seedu.address.model.task.ReadOnlyTask;
import seedu.address.model.task.Task;
import seedu.address.model.task.TaskList;

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

    /** Returns the TaskManager */
    ReadOnlyTaskManager getTaskManager();

    /** Deletes the given task. */
    void deleteTask(ReadOnlyTask target) throws TaskList.TaskNotFoundException;

    /** Adds the given task */
    void addTask(Task task);

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

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

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

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

    /** Updates undo copy of task list*/
    void updateCopy(ReadOnlyTaskManager taskManager);

    /** Returns undo copy of task list*/
    ReadOnlyTaskManager getCopy();

    /** Clears undo copy of task list*/
    void clearCopy();

    /** Checks if there are any undoable commands*/
    boolean checkChanges();

}

@@ -1885,10 +1885,167 @@
 ges();%0A%0A
+    /** Updates flag for copy of address book*/%0A    void updateFlag(String newFlag);%0A%0A    /** Returns flag for copy of address book*/%0A    String getFlag();%0A%0A
 %7D%0A

Add methods to Model interface