Action<State, System, T, R> constructor
Action<State, System, T, R> (})
Creates a new action command.
Parameters:
description
: The description of the action.arbitrary
: The arbitrary used to generate values.run
: A function to perform the action.precondition
: A function to test the precondition of the action.postcondition
: A function to test the postcondition of the action.
Implementation
Action(
super.description,
this.arbitrary, {
required void Function(State, T) nextState,
required R Function(System, T) run,
bool Function(State, T)? precondition,
bool Function(State, T, R)? postcondition,
}) {
_nextState = nextState;
_run = run;
_precondition = precondition;
_postcondition = postcondition;
}