Package net.jqwik.api.state
Class Action.JustTransform<S>
- java.lang.Object
-
- net.jqwik.api.state.Action.JustTransform<S>
-
- All Implemented Interfaces:
Action<S>
,Action.Independent<S>
public abstract static class Action.JustTransform<S> extends java.lang.Object implements Action.Independent<S>
Subclass if you want to implement an independent action that simply transforms the given state.If you rather want to declaratively specify an action start with Action.just(Transformer), Action.when(Predicate) or Action.builder().
For actions whose state transformation depends on the state, you have to implement either Action.Dependent or Action.Independent.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.jqwik.api.state.Action
Action.Dependent<S>, Action.Independent<S>, Action.JustMutate<S>, Action.JustTransform<S>
-
-
Constructor Summary
Constructors Constructor Description JustTransform()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract S
transform(S state)
Arbitrary<Transformer<S>>
transformer()
Return an arbitrary for transformers that does not depend on the previous state.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.jqwik.api.state.Action
precondition
-
-
-
-
Method Detail
-
transformer
public Arbitrary<Transformer<S>> transformer()
Description copied from interface:Action.Independent
Return an arbitrary for transformers that does not depend on the previous state.In addition to performing a state transformation the transforming function can also check or assert post-conditions and invariants that should hold when doing the transformation.
- Specified by:
transformer
in interfaceAction.Independent<S>
- Returns:
- an arbitrary of type Transformer
.
-
-