package seedu.address.model;

import java.util.Set;
import java.util.Stack;

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

/**
 * The API of the Model component.
 */
public interface Model {

    Stack<String> getUndoStack();

    Stack<ReadOnlyTask> getDeletedStackOfTasksAdd();

    Stack<ReadOnlyTask> getDeletedStackOfTasks();

    Stack<Integer> getDeletedStackOfTasksIndex();

    /**
     * Clears existing backing model and replaces with the provided new data.
     */
    void resetData(ReadOnlyAddressBook newData);

    /** Returns the AddressBook */
    ReadOnlyAddressBook getAddressBook();

    /**Returns the config*/
    Config getConfig();

    /** Raises an event to indicate the model has changed */
    void updateFileLocation();

    /** Deletes the given task. */
    int deleteTask(ReadOnlyTask target) throws UniqueTaskList.TaskNotFoundException;

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

    /**
     * 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) throws UniqueTaskList.DuplicateTaskException;
    
    void revertData();

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

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

    /**
     * Updates the filter of the filtered task list to filter by the given
     * keywords. Filters in both title and content of task if isInContent is true.
     * Filters only in title otherwise.
     */
    void updateFilteredTaskList(boolean isInContent, Set<String> keywords);
}

@@ -170,24 +170,92 @@
 rvableList;%0A
+import seedu.address.model.tag.UniqueTagList.DuplicateTagException;%0A
 import seedu
@@ -514,21 +514,19 @@
 Model %7B%0A
-%0A    
+%09%0A%09
 Stack%3CSt
@@ -546,22 +546,19 @@
 Stack();
-%0A%0A    
+%09%0A%09
 Stack%3CRe
@@ -594,29 +594,25 @@
 TasksAdd();%0A
-%0A    
+%09
 Stack%3CReadOn
@@ -645,21 +645,17 @@
 asks();%0A
-%0A    
+%09
 Stack%3CIn
@@ -693,29 +693,19 @@
 dex();%0A%0A
-    /**%0A     
+%09/*
 * Clears
@@ -768,21 +768,87 @@
 ew data.
-%0A    
+ %0A%09 * @throws DuplicateTaskException %0A%09 * @throws DuplicateTagException
  */%0A    
@@ -966,24 +966,28 @@
 ressBook();%0A
+    
 %0A    /**Retu
@@ -1023,24 +1023,28 @@
 etConfig();%0A
+    
 %0A    /** Rai
@@ -1342,32 +1342,60 @@
 teTaskException;
+%0A    %0A    void revertData();
 %0A%0A    /**%0A     *
@@ -1457,23 +1457,16 @@
 ex%7D with
-%0A     *
  %7B@code 
@@ -1522,35 +1522,16 @@
 xception
-%0A     *            
  if upda
@@ -1575,35 +1575,16 @@
 sk to be
-%0A     *            
  equival
@@ -1589,16 +1589,28 @@
 alent to
+%0A     *     
  another
@@ -1677,35 +1677,16 @@
 xception
-%0A     *            
  if %7B@co
@@ -1740,27 +1740,8 @@
  the
-%0A     *            
  fil
@@ -1827,24 +1827,36 @@
  editedTask)
+%0A           
  throws Uniq
@@ -1894,50 +1894,15 @@
 on;%0A
-    %0A    void revertData();%0A%0A    /**%0A     
+%0A    /*
 * Re
@@ -1935,23 +1935,16 @@
 st as an
-%0A     *
  %7B@code 
@@ -1984,21 +1984,16 @@
 lyTask%3E%7D
-%0A    
  */%0A    
@@ -2175,39 +2175,32 @@
 wAll();%0A%0A    /**
-%0A     *
  Updates the fil
@@ -2215,28 +2215,30 @@
 he filtered 
-task
+person
  list to fil
@@ -2253,23 +2253,16 @@
 he given
-%0A     *
  keyword
@@ -2266,121 +2266,8 @@
 ords
-. Filters in both title and content of task if isInContent is true.%0A     * Filters only in title otherwise.%0A     
 */%0A 
@@ -2301,29 +2301,8 @@
 ist(
-boolean isInContent, 
 Set%3C
@@ -2320,10 +2320,16 @@
 words);%0A
+    %0A%0A
 %7D%0A

Update Model.java