Class SetPersistentPropertyCommand
java.lang.Object
VASSAL.command.Command
VASSAL.command.SetPersistentPropertyCommand
This Command sets a Persistent Property in a PersistentPropertyContainer.
Currently only BasicPiece and Decorator implement PersistentPropertyContainer.
The Undo Command is a SetPropertyCommand to set the value back to the original value.
-
Field Summary
-
Constructor Summary
ConstructorDescriptionSetPersistentPropertyCommand
(String id, Object key, Object oldValue, Object newValue) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
Perform the action which this Command representsDetailed information for toString()getId()
getKey()
protected Command
If the action can be undone, return a Command that performs the inverse action.void
void
void
setNewValue
(Object newValue) void
setOldValue
(Object oldValue) Methods inherited from class VASSAL.command.Command
append, execute, getSubCommands, getUndoCommand, isAtomic, isLoggable, isNull, isNullOrContainsOnly, stripSubCommands, toString
-
Field Details
-
COMMAND_PREFIX
- See Also:
-
key
-
oldValue
-
newValue
-
id
-
-
Constructor Details
-
SetPersistentPropertyCommand
-
-
Method Details
-
executeCommand
protected void executeCommand()Description copied from class:Command
Perform the action which this Command represents- Specified by:
executeCommand
in classCommand
-
myUndoCommand
Description copied from class:Command
If 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:
myUndoCommand
in classCommand
-
getDetails
Description copied from class:Command
Detailed information for toString()- Overrides:
getDetails
in classCommand
-
getKey
-
setKey
-
getOldValue
-
setOldValue
-
getNewValue
-
setNewValue
-
getId
-
setId
-