Interface Output<T>

  • Type Parameters:
    T - The type of the output.
    All Superinterfaces:
    Consumer<T>
    All Known Implementing Classes:
    CTREOutput
    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 Output<T>
    extends Consumer<T>
    Extension of a Consumer adding an additional composition method. Output can be used exactly like Consumer (and library functions should not take Outputs as method parameters, instead using Consumer). However, library functions should return an Output where they would normally return a Consumer.
    • Method Detail

      • after

        default <I> Output<I> after​(Function<I,​T> f)
        Creates a new Output that applies the provided Function to the input before passing it to this Output.
        Type Parameters:
        I - The input type of the Function (and thus the Input type of the resulting Output).
        Parameters:
        f - The Function (or Processor) to apply.
        Returns:
        A new Output as described above.