Interface ComposableFunction<T,​R>

  • Type Parameters:
    T - the type of the input to the function
    R - the type of the result of the function
    All Superinterfaces:
    java.util.function.Function<T,​R>
    Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

    @FunctionalInterface
    public interface ComposableFunction<T,​R>
    extends java.util.function.Function<T,​R>
    Represents a function that accepts one argument and produces a result and could be with a Consumer of the resulting type.
    Since:
    5.2.0
    • Method Summary

      All Methods Instance Methods Default Methods 
      Modifier and Type Method Description
      default java.util.function.Consumer<T> andNext​(java.util.function.Consumer<R> after)
      Chain this function with a Consumer that expects the same type.
      • Methods inherited from interface java.util.function.Function

        andThen, apply, compose
    • Method Detail

      • andNext

        default java.util.function.Consumer<T> andNext​(java.util.function.Consumer<R> after)
        Chain this function with a Consumer that expects the same type.
        Parameters:
        after - Consumer that will receive the output of the function
        Returns:
        after consumer with the output of the function passed in