Interface ThrowingConsumer<T>

Type Parameters:
T - consumed 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 ThrowingConsumer<T>
Like Consumer<T> but allows checked exceptions.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    accept(T t)
    Performs the action.
  • Method Details

    • accept

      void accept(T t) throws Exception
      Performs the action.
      Parameters:
      t - value
      Throws:
      Exception - if any error occurs