T
- The type of state to be transformed in a chain@FunctionalInterface @API(status=EXPERIMENTAL, since="1.7.0") public interface Transformation<T> extends java.util.function.Function<java.util.function.Supplier<T>,Arbitrary<Transformer<T>>>
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.Chain
,
Transformer
Modifier and Type | Interface and Description |
---|---|
static class |
Transformation.Builder<T> |
Modifier and Type | Field and Description |
---|---|
static java.util.function.Predicate<?> |
NO_PRECONDITION |
Modifier and Type | Method and Description |
---|---|
default java.util.function.Predicate<T> |
precondition()
Override this method if the applicability of the provided transformers depends on the previous state
|
static <T> Transformation.Builder<T> |
when(java.util.function.Predicate<T> precondition)
Create a TransformerProvider with a precondition
|
static <T> Transformation.Builder<T> when(java.util.function.Predicate<T> precondition)
default java.util.function.Predicate<T> precondition()
T