Interface Consumer<T,E extends Exception>

Type Parameters:
T - The type of object consumed.
E - The type of exception thrown.
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,E extends Exception>
A Consumer functional interface which can throw a checked Exception.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    accept(T t)
    Consume the value.
  • Method Details

    • accept

      void accept(T t) throws E
      Consume the value.
      Parameters:
      t - The value.
      Throws:
      E - An exception.