Interface ExceptionalConsumer<T,E extends Throwable>

Type Parameters:
T - the input type
E - the exception of your choice
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 ExceptionalConsumer<T,E extends Throwable>
A generic functional interface that allows you to consume an item and potentially throw an exception.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    accept(T t)
    The method that will be called
  • Method Details

    • accept

      void accept(T t) throws E
      The method that will be called
      Parameters:
      t - the input
      Throws:
      E - if the call throws an exception