public final class CommandHistoryObj extends java.lang.Object implements CommandHistory
| Constructor and Description |
|---|
CommandHistoryObj() |
| Modifier and Type | Method and Description |
|---|---|
void |
add(Command cmd)
Add command
undoable and clear redoable. |
boolean |
redo()
Pop command from
redoable, redo it, then push it
onto undoable. |
boolean |
undo()
Pop command from
undoable, undo it, then push it
onto redoable. |
public CommandHistoryObj()
public void add(Command cmd)
CommandHistoryundoable and clear redoable.add in interface CommandHistorycmd - the command to be run.public boolean undo()
CommandHistoryundoable, undo it, then push it
onto redoable.undo in interface CommandHistorypublic boolean redo()
CommandHistoryredoable, redo it, then push it
onto undoable.redo in interface CommandHistory