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

    Nested Classes
    Modifier and Type
    Interface
    Description
    static class 
     
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final Predicate<?>
     
  • Method Summary

    Modifier and Type
    Method
    Description
    default Predicate<T>
    Override this method if the applicability of the provided transformers depends on the previous state
    static <T> Transformation.Builder<T>
    when(Predicate<T> precondition)
    Create a TransformerProvider with a precondition

    Methods inherited from interface java.util.function.Function

    andThen, apply, compose
  • Field Details

    • NO_PRECONDITION

      static final Predicate<?> NO_PRECONDITION
  • Method Details

    • when

      static <T> Transformation.Builder<T> when(Predicate<T> precondition)
      Create a TransformerProvider with a precondition
    • precondition

      default Predicate<T> precondition()
      Override this method if the applicability of the provided transformers depends on the previous state
      Returns:
      a predicate with input T