Package VASSAL.command
Class ConditionalCommand
java.lang.Object
VASSAL.command.Command
VASSAL.command.ConditionalCommand
public class ConditionalCommand extends Command
Evaluates properties of the GameModule and conditionally executes
another Command if all values are satisfied.
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ConditionalCommand.Condition
The class representing a condition that must be satisfied if the Command is to be executedstatic class
ConditionalCommand.Eq
static class
ConditionalCommand.Gt
static class
ConditionalCommand.Lt
static class
ConditionalCommand.Not
-
Constructor Summary
Constructors Constructor Description ConditionalCommand(ConditionalCommand.Condition[] conditions, Command delegate)
-
Method Summary
Modifier and Type Method Description protected void
executeCommand()
Perform the action which this Command representsConditionalCommand.Condition[]
getConditions()
Command
getDelegate()
protected Command
myUndoCommand()
If the action can be undone, return a Command that performs the inverse action.Methods inherited from class VASSAL.command.Command
append, execute, getDetails, getSubCommands, getUndoCommand, hasNullSubcommands, isAtomic, isLoggable, isNull, stripSubCommands, toString
-
Constructor Details
-
ConditionalCommand
-
-
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
-
getDelegate
-
getConditions
-