Interface NonnullFunction<T,R>

  • Type Parameters:
    T - argument type
    R - return type
    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 NonnullFunction<T,R>
    A version of Function that explicitly returns a non-null value, and takes a non-null parameter value.
    • Method Detail

      • apply

        @Nonnull
        R apply​(@Nonnull
                T value)
        Run the function. The caller must assert the non-null validity of the argument; the receiver should safely assume the argument is non-null.
        Parameters:
        value - non-null parameter
        Returns:
        non-null value