Interface FragileConsumer<T,E extends java.lang.Throwable>
-
- Type Parameters:
T
- the type of the input to the operationE
- the type ofThrowable
which may be thrown
public interface FragileConsumer<T,E extends java.lang.Throwable>
AConsumer
which can throw aThrowable
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description void
accept(T t)
Performs this operation on the given argument.default FragileConsumer<T,E>
andThen(FragileConsumer<? super T,E> after)
Returns a composedFragileConsumer
that performs, in sequence, this operation followed by theafter
operation.static <T> java.util.function.Consumer<T>
wrap(FragileConsumer<T,java.lang.Exception> throwingConsumer)
-
-
-
Method Detail
-
accept
void accept(T t) throws E extends java.lang.Throwable
Performs this operation on the given argument.
-
andThen
default FragileConsumer<T,E> andThen(FragileConsumer<? super T,E> after)
Returns a composedFragileConsumer
that performs, in sequence, this operation followed by theafter
operation. If performing either operation throws an exception, it is relayed to the caller of the composed operation. If performing this operation throws an exception, theafter
operation will not be performed.- Parameters:
after
- the operation to perform after this operation- Returns:
- a composed
FragileConsumer
that performs in sequence this operation followed by theafter
operation - Throws:
java.lang.NullPointerException
- ifafter
is null
-
wrap
static <T> java.util.function.Consumer<T> wrap(FragileConsumer<T,java.lang.Exception> throwingConsumer)
-
-