Interface ActionSequence<M>

Type Parameters:
M - The type of the model

@API(status=MAINTAINED, since="1.0") public interface ActionSequence<M>
A sequence of Actions that can be run with a model of type M
  • Method Details

    • runActions

      List<Action<M>> runActions()
    • run

      M run(M model)
    • size

      @API(status=EXPERIMENTAL, since="1.3.3") int size()
    • withInvariant

      default ActionSequence<M> withInvariant(Invariant<M> invariant)
      Add an unlabelled invariant to a sequence.
      Parameters:
      invariant - will be checked after each successful invocation of run(Object)
      Returns:
      the same sequence instance
      See Also:
    • withInvariant

      @API(status=MAINTAINED, since="1.4.0") ActionSequence<M> withInvariant(@Nullable String label, Invariant<M> invariant)
      Add a labelled invariant to a sequence.
      Parameters:
      label - will show up in error messages when the invariant fails
      invariant - will be checked after each successful invocation of run(Object)
      Returns:
      the same sequence instance
      See Also:
    • finalModel

      M finalModel()
    • runState

    • peek

      @API(status=EXPERIMENTAL, since="1.2.5") ActionSequence<M> peek(Consumer<M> modelPeeker)
      Peek into the model of a running sequence. The modelPeeker will be called after each successful invocation of run(Object) but before checking invariants.
      Parameters:
      modelPeeker -
      Returns:
      the same sequence instance