Interface NonnullParamFunction<T,R>

  • Type Parameters:
    T - parameter 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 NonnullParamFunction<T,R>
    A version of the Function interface where the parameter is explicitly non-null, and the return value is nullable.
    • Method Detail

      • apply

        @Nullable
        R apply​(@Nonnull
                T value)
        Runs 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 value
        Returns:
        nullable return value