Interface FragileConsumer<T,E extends 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 Throwable>
-
Method Summary
Modifier and TypeMethodDescriptionvoid
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> Consumer<T>
wrap
(FragileConsumer<T, Exception> throwingConsumer)
-
Method Details
-
accept
Performs this operation on the given argument.- Parameters:
t
- the input argument- Throws:
E
- if there is some error or exception
-
andThen
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:
NullPointerException
- ifafter
is null
-
wrap
-