Interface NonnullReturnFunction<T,R>

  • Type Parameters:
    T - value 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 NonnullReturnFunction<T,R>
    A version of the Function interface with an explicitly non-null return value, but nullable parameter value.
    • Method Detail

      • apply

        @Nonnull
        R apply​(@Nullable
                T value)
        Run the function.
        Parameters:
        value - nullable parameter value
        Returns:
        non-null return value