Interface FallibleConsumer<T,X extends Throwable>

Type Parameters:
T - the type of the input to the operation
X - the type of the exception potentially being thrown by the operation

public interface FallibleConsumer<T,X extends Throwable>
An alternative to the Consumer interface that allows the functional method to throw a checked exception.
Author:
Ayco Holleman
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    accept(T t)
    Performs this operation on the given argument.
  • Method Details

    • accept

      void accept(T t) throws X
      Performs this operation on the given argument.
      Parameters:
      t - the input argument
      Throws:
      X - if the operation fails