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 Details

  • Constructor Details

    • SetPersistentPropertyCommand

      public SetPersistentPropertyCommand(String id, Object key, Object oldValue, Object newValue)
  • Method Details

    • executeCommand

      protected void executeCommand()
      Description copied from class: Command
      Perform the action which this Command represents
      Specified by:
      executeCommand in class Command
    • myUndoCommand

      protected Command 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 undo Command.executeCommand(), not the actions of subcommands
      Specified by:
      myUndoCommand in class Command
    • getDetails

      public String getDetails()
      Description copied from class: Command
      Detailed information for toString()
      Overrides:
      getDetails in class Command
    • getKey

      public Object getKey()
    • setKey

      public void setKey(Object key)
    • getOldValue

      public Object getOldValue()
    • setOldValue

      public void setOldValue(Object oldValue)
    • getNewValue

      public Object getNewValue()
    • setNewValue

      public void setNewValue(Object newValue)
    • getId

      public String getId()
    • setId

      public void setId(String id)