Interface NonnullConsumer<T>

  • 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 NonnullConsumer<T>
    A version of Consumer but with an explicit nonnull value.
    • Method Detail

      • accept

        void accept​(@Nonnull
                    T t)
        Accept the value into the consumer. The caller must assert the non-null validity of the argument; the receiver should safely assume the argument is non-null.
        Parameters:
        t - parameter value, which must be non-null