Interface ThrowingConsumer<T>

Type Parameters:
T - type of consumed item
All Superinterfaces:
Consumer<T>
All Known Subinterfaces:
ConsumerEx<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 ThrowingConsumer<T> extends Consumer<T>
A Consumer that declares checked exception.
Since:
6.0
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    accept(T item)
     
    void
    acceptEx(T item)
    Consumes given item.

    Methods inherited from interface java.util.function.Consumer

    andThen