Interface ThrowingConsumer<T,X extends Exception>

Type Parameters:
T - The input type of the consumer.
X - The exception type the consumer may throw.

public interface ThrowingConsumer<T,X extends Exception>
Functional interface for operations which may throw a checked exception.
Since:
5.0.2
Author:
John Hendrikx
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    accept(T input)
    Accepts an input to perform an operation.
  • Method Details

    • accept

      void accept(T input) throws X
      Accepts an input to perform an operation.
      Parameters:
      input - The input of type T.
      Throws:
      X - When the consumer failed with an exception of type X.