Interface Consumer<T>

  • All Superinterfaces:
    Consumer<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 Consumer<T>
    extends Consumer<T>
    • Field Detail

      • EMPTY_CONSUMER

        static final Consumer EMPTY_CONSUMER
    • Method Detail

      • consume

        void consume​(@NotNull
                     T t)
        Parameters:
        t - consequently takes value of each element of the set this processor is passed to for processing. t is supposed to be a not-null value.
      • accept

        default void accept​(T t)
        Specified by:
        accept in interface Consumer<T>