M - The type of the model@API(status=MAINTAINED,
since="1.0")
public interface ActionSequence<M>
M| Modifier and Type | Interface and Description |
|---|---|
static class |
ActionSequence.RunState |
| Modifier and Type | Method and Description |
|---|---|
M |
finalModel() |
ActionSequence<M> |
peek(java.util.function.Consumer<M> modelPeeker)
Peek into the model of a running sequence.
|
M |
run(M model) |
java.util.List<Action<M>> |
runActions() |
ActionSequence.RunState |
runState() |
int |
size() |
default ActionSequence<M> |
withInvariant(Invariant<M> invariant)
Add an unlabelled invariant to a sequence.
|
ActionSequence<M> |
withInvariant(java.lang.String label,
Invariant<M> invariant)
Add a labelled invariant to a sequence.
|
@API(status=EXPERIMENTAL,
since="1.3.3")
int size()
default ActionSequence<M> withInvariant(Invariant<M> invariant)
invariant - will be checked after each successful invocation of run(Object)withInvariant(String, Invariant)@API(status=EXPERIMENTAL,
since="1.2.5")
ActionSequence<M> withInvariant(java.lang.String label,
Invariant<M> invariant)
label - will show up in error messages when the invariant failsinvariant - will be checked after each successful invocation of run(Object)withInvariant(Invariant)M finalModel()
ActionSequence.RunState runState()
@API(status=EXPERIMENTAL,
since="1.2.5")
ActionSequence<M> peek(java.util.function.Consumer<M> modelPeeker)
modelPeeker will be called after each successful
invocation of run(Object) but before checking invariants.modelPeeker -