public abstract class Command
extends java.lang.Object
Modifier | Constructor and Description |
---|---|
protected |
Command(Schedule schedule)
Initializes a new instance of the
Command class. |
Modifier and Type | Method and Description |
---|---|
protected abstract boolean |
execute()
Carries out an action that changes the schedule in some way.
|
Schedule |
getSchedule()
|
protected abstract void |
redo()
Repeats an action that has been undone.
|
protected abstract void |
undo()
Undoes an action, restoring the schedule to the state it was in before carrying out the action.
|
protected abstract boolean execute()
Commands, which return false are never recorded in the command history.
protected abstract void undo()
protected abstract void redo()