Interface ThrowableConsumer<T>

All Superinterfaces:
Consumer<T>
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 ThrowableConsumer<T> extends Consumer<T>
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    accept(T t)
     
    void
    Method to accept a value that may throw a Throwable

    Methods inherited from interface java.util.function.Consumer

    andThen
  • Method Details

    • accept

      default void accept(T t)
      Specified by:
      accept in interface Consumer<T>
    • acceptThrowable

      void acceptThrowable(T t) throws Throwable
      Method to accept a value that may throw a Throwable
      Parameters:
      t - t
      Throws:
      Throwable - Throwable