Interface Input<T>

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

      • then

        default <R> Input<R> then​(Function<T,​R> f)
        Creates a new Input that applies the provided Function to this Input's output.
        Type Parameters:
        R - The return type of the provided Function, and thus the return type of the returned Input.
        Parameters:
        f - The Function (or Processor) to apply.
        Returns:
        A new Input as described above.