@FunctionalInterface
public interface CheckedConsumer<T>
Consumer
that allows for checked exceptions.Modifier and Type | Method | Description |
---|---|---|
void |
accept(T t) |
Performs this operation on the given argument.
|
static <T> java.util.function.Consumer<T> |
sneaky(CheckedConsumer<T> consumer) |
|
static <T> java.util.function.Consumer<T> |
unchecked(CheckedConsumer<T> consumer) |
|
static <T> java.util.function.Consumer<T> |
unchecked(CheckedConsumer<T> consumer,
java.util.function.Consumer<java.lang.Throwable> handler) |
void accept(T t) throws java.lang.Throwable
t
- the input argumentjava.lang.Throwable
static <T> java.util.function.Consumer<T> sneaky(CheckedConsumer<T> consumer)
static <T> java.util.function.Consumer<T> unchecked(CheckedConsumer<T> consumer)
static <T> java.util.function.Consumer<T> unchecked(CheckedConsumer<T> consumer, java.util.function.Consumer<java.lang.Throwable> handler)
Copyright © 2018. All rights reserved.