//@@author generated
package seedu.address.logic.commands;

import seedu.address.model.TaskManager;

/**
 * Clears the address book.
 */
public class ClearCommand extends Command {

    public static final String COMMAND_WORD = "clear";
    public static final String MESSAGE_SUCCESS = "Dueue has been cleared!";
    public static final String MESSAGE_USAGE = COMMAND_WORD + ": Clear all tasks in Dueue \n"
            + "Parameters: Nil\n"
            + "Example: " + COMMAND_WORD;


    @Override
    public CommandResult execute() {
        assert model != null;
        model.resetData(new TaskManager());
        return new CommandResult(MESSAGE_SUCCESS);
    }


    @Override
    public boolean isUndoable() {
        return false;
    }
}

@@ -8,17 +8,17 @@
 hor 
-generated
+A0138474X
 %0Apac
@@ -53,16 +53,144 @@
 mands;%0A%0A
+import seedu.address.commons.exceptions.IllegalValueException;%0Aimport seedu.address.logic.commands.exceptions.CommandException;%0A
 import s
@@ -292,16 +292,24 @@
 extends 
+AbleUndo
 Command 
@@ -612,16 +612,52 @@
 D_WORD;%0A
+    %0A    private TaskManager tasks;%0A
 %0A%0A    @O
@@ -731,16 +731,100 @@
 = null;%0A
+        tasks = new TaskManager();%0A        tasks.resetData(model.getTaskManager());%0A
         
@@ -985,13 +985,457 @@
 urn 
-false
+true;%0A    %7D%0A%0A%0A    @Override%0A    public CommandResult executeUndo(String message) throws CommandException %7B%0A        assert model != null;%0A        TaskManager tasks = new TaskManager();%0A        tasks.resetData(model.getTaskManager());%0A        model.resetData(this.tasks);%0A        this.tasks = tasks;%0A        return new CommandResult(message);%0A    %7D%0A%0A%0A    @Override%0A    public Command getUndoCommand() throws IllegalValueException %7B%0A        return this
 ;%0A  

edit clear command to support undo and redo