- java.lang.Object
-
- io.github.interacto.command.CommandImpl
-
- io.github.interacto.command.library.Undo
-
- All Implemented Interfaces:
Command
public class Undo extends CommandImpl
A command that undoes a command.- Author:
- Arnaud BLOUIN
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface io.github.interacto.command.Command
Command.CmdStatus, Command.RegistrationPolicy
-
-
Field Summary
-
Fields inherited from class io.github.interacto.command.CommandImpl
status
-
-
Constructor Summary
Constructors Constructor Description Undo()Initialises an Undo command.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancanDo()Checks whether the command can be executed.protected voiddoCmdBody()This method contains the statements to execute the command.-
Methods inherited from class io.github.interacto.command.CommandImpl
cancel, createMemento, doIt, done, flush, getRegistrationPolicy, getStatus, hadEffect, isDone, toString, unregisteredBy
-
-
-
-
Method Detail
-
canDo
public boolean canDo()
Description copied from interface:CommandChecks whether the command can be executed.- Specified by:
canDoin interfaceCommand- Overrides:
canDoin classCommandImpl- Returns:
- True if the command can be executed.
-
doCmdBody
protected void doCmdBody()
Description copied from class:CommandImplThis method contains the statements to execute the command. This method is automatically called by DoIt and must not be called explicitly.- Specified by:
doCmdBodyin classCommandImpl
-
-