Interface Consumer<T>

Type Parameters:
T - the input type
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.

@Deprecated @FunctionalInterface public interface Consumer<T> extends Consumer<T>
Deprecated.
Use Consumer instead. This interface will be removed in the next release. If you are targeting Android, see how to enable desugaring.
A functional interface (ala Java's Consumer interface, previously implemented here for cross compatibility with Android before desugaring support was introduced.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    accept(T t)
    Deprecated.
    Execute this operation on the supplied argument.

    Methods inherited from interface java.util.function.Consumer

    andThen
  • Method Details

    • accept

      void accept(T t)
      Deprecated.
      Execute this operation on the supplied argument. It is expected to have side effects.
      Specified by:
      accept in interface Consumer<T>
      Parameters:
      t - the input argument