Command<State, System> class
abstract
A operation that can be performed on a state and system.
- Implementers
Constructors
- Command.new(String description)
- Creates a new command.
Properties
- description → String
-
A description of the command.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
nextState(
CommandContext< State, System> context, State state) → Future<void> - Updates the state to the next state.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
postcondition(
CommandContext< State, System> context, State state, dynamic result) → Future<bool> - Returns true if postcondition of the command is satisfied.
-
precondition(
CommandContext< State, System> context, State state) → Future<bool> - Returns true if the command can be run on the given state.
-
run(
CommandContext< State, System> context, System system) → Future - Performs the command on the given system.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited