Class ChangePiece
java.lang.Object
VASSAL.command.Command
VASSAL.command.ChangePiece
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAppend a subcommand to this Command.protected voidChanges the state of aGamePieceby invokingGamePiece.setState(String)Detailed information for toString()getId()booleanisNull()protected CommandIf the action can be undone, return a Command that performs the inverse action.Methods inherited from class Command
execute, getSubCommands, getUndoCommand, isAtomic, isLoggable, isNullOrContainsOnly, stripSubCommands, toStringModifier and TypeMethodDescriptionvoidexecute()Execute this command by first invokingCommand.executeCommand(), then invoking itself recursively on all subcommands.Command[]protected booleanisAtomic()Return true if this command has no sub-commands attached to it (other than null commands).booleanbooleanisNullOrContainsOnly(Class<?> target) Return true if this Command is a NullCommand or only contains Null Commands or commands of the same type as targetvoidRemove all subcommands.toString()
-
Field Details
-
newState
-
oldState
-
-
Constructor Details
-
ChangePiece
-
-
Method Details
-
executeCommand
protected void executeCommand()Changes the state of aGamePieceby invokingGamePiece.setState(String)- Specified by:
executeCommandin classCommand
-
append
-
myUndoCommand
Description copied from class:CommandIf the action can be undone, return a Command that performs the inverse action. The Command returned should only undoCommand.executeCommand(), not the actions of subcommands- Specified by:
myUndoCommandin classCommand
-
getId
-
getNewState
-
getOldState
-
isNull
-
getDetails
Description copied from class:CommandDetailed information for toString()- Overrides:
getDetailsin classCommand
-