Package net.jqwik.api.state
Class ActionBuilder<S>
- java.lang.Object
-
- net.jqwik.api.state.ActionBuilder<S>
-
- Type Parameters:
S
- Type of the object to transform through an action
@API(status=EXPERIMENTAL, since="1.7.0") public class ActionBuilder<S> extends java.lang.Object
An ActionBuilder is used to create simple Action objects. Actions are simple if their state transformation does not depend on the state itself. However, even simple actions can have preconditions.Alternatively you can subclass Action.JustTransform or Action.JustMutate.
For actions whose state transformation depends on the state, you have to provide implementations of either Action.Dependent or Action.Independent.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ActionBuilder<S>
describeAs(java.lang.String description)
Action.Independent<S>
just(Transformer<S> transformer)
Action.Independent<S>
justMutate(java.util.function.Consumer<S> mutatingFunction)
ActionBuilder<S>
when(java.util.function.Predicate<S> precondition)
-
-
-
Method Detail
-
when
public ActionBuilder<S> when(java.util.function.Predicate<S> precondition)
-
describeAs
public ActionBuilder<S> describeAs(java.lang.String description)
-
just
public Action.Independent<S> just(Transformer<S> transformer)
-
justMutate
public Action.Independent<S> justMutate(java.util.function.Consumer<S> mutatingFunction)
-
-