A - the type of the input to the operationX - the type of the exception the operation might throw@FunctionalInterface
public interface ThrowingConsumer<A,X extends java.lang.Exception>
Consumer is expected to operate via side-effects.| Modifier and Type | Method and Description |
|---|---|
void |
accept(A t)
Performs this operation on the given argument.
|
default ThrowingConsumer<A,X> |
andThen(ThrowingConsumer<? super A,? extends X> after)
Returns a composed
Consumer that performs, in sequence, this operation followed by the after
operation. |
default ThrowingRunnable<X> |
curry(A t)
Create a
ThrowingRunnable by currying the parameter. |
default <T> ThrowingConsumer<T,X> |
map(ThrowingFunction<? super T,? extends A,X> fun)
Change the type of the parameter using the supplied mapper
|
void accept(A t) throws X extends java.lang.Exception
t - the input argumentX - if an error occursX extends java.lang.Exceptiondefault ThrowingConsumer<A,X> andThen(ThrowingConsumer<? super A,? extends X> after)
Consumer that performs, in sequence, this operation followed by the after
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, the after operation will not be performed.
after - the operation to perform after this operationConsumer that performs in sequence this operation followed by the after
operationjava.lang.NullPointerException - if after is nulldefault ThrowingRunnable<X> curry(A t)
ThrowingRunnable by currying the parameter.t - the constant parameterdefault <T> ThrowingConsumer<T,X> map(ThrowingFunction<? super T,? extends A,X> fun)
T - the new input type of the operationfun - the mapperCopyright © 2015–2018 52°North Initiative for Geospatial Open Source Software GmbH. All rights reserved.