Package VASSAL.command
Class SetPersistentPropertyCommand
java.lang.Object
VASSAL.command.Command
VASSAL.command.SetPersistentPropertyCommand
public class SetPersistentPropertyCommand extends Command
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
Constructors Constructor Description SetPersistentPropertyCommand(String id, Object key, Object oldValue, Object newValue)
-
Method Summary
Modifier and Type Method Description protected void
executeCommand()
Perform the action which this Command representsString
getDetails()
Detailed information for toString()String
getId()
Object
getKey()
Object
getNewValue()
Object
getOldValue()
protected Command
myUndoCommand()
If the action can be undone, return a Command that performs the inverse action.void
setId(String id)
void
setKey(Object key)
void
setNewValue(Object newValue)
void
setOldValue(Object oldValue)
Methods inherited from class VASSAL.command.Command
append, execute, getSubCommands, getUndoCommand, hasNullSubcommands, isAtomic, isLoggable, isNull, stripSubCommands, toString
-
Field Details
-
COMMAND_PREFIX
- See Also:
- Constant Field Values
-
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
-