Package net.jqwik.api.state
Interface Transformation<T>
- Type Parameters:
T
- The type of state to be transformed in a chain
- All Superinterfaces:
Function<Supplier<T>,
Arbitrary<Transformer<T>>>
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface
@API(status=EXPERIMENTAL,
since="1.7.0")
public interface Transformation<T>
extends Function<Supplier<T>,Arbitrary<Transformer<T>>>
A transformation provides an arbitrary of transformers
for values of type
T
in the context of chains.
The provided arbitrary of transformers can depend on the previous state,
which can be retrieved using the first supplier argument of the function.
A transformation can also be restricted by a precondition,
which must hold for the transformation to be applicable.- See Also:
-
Nested Class Summary
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionOverride this method if the applicability of the provided transformers depends on the previous statestatic <T> Transformation.Builder<T>
Create a TransformerProvider with a precondition
-
Field Details
-
NO_PRECONDITION
-
-
Method Details
-
when
Create a TransformerProvider with a precondition -
precondition
Override this method if the applicability of the provided transformers depends on the previous state- Returns:
- a predicate with input
T
-