T - the type of the object argument to the operationE - the type of the potential exception of the operationExceptionHandlerSupport<T,E>, NoReturnExceptionHandlerSupport<ObjIntConsumer<T>,BiFunction<T,Integer,CompletionStage<Void>>>@FunctionalInterface public interface ObjIntConsumerWithException<T,E extends Exception> extends NoReturnExceptionHandlerSupport<ObjIntConsumer<T>,BiFunction<T,Integer,CompletionStage<Void>>>
int-valued argument, and returns no result. This is the
(reference, int) specialization of BiConsumerWithException.
Unlike most other functional interfaces, ObjIntConsumer is expected
to operate via side-effects.
void accept(T t, int value) throws
E - The functional method.ObjIntConsumer<T>ObjIntConsumer<T>ObjIntConsumer<T>ObjIntConsumer| Modifier and Type | Method | Description |
|---|---|---|
void |
accept(T t,
int value) |
Performs this operation on the given arguments.
|
static <T,E extends Exception> |
asBiConsumer(ObjIntConsumerWithException<T,E> operation) |
Converts a
ObjIntConsumerWithException to a
BiConsumerWithException returning null. |
static <T,E extends Exception> |
failing(Supplier<E> exceptionBuilder) |
Returns an operation that always throw exception.
|
default ObjIntConsumer<T> |
ignore() |
Converts this
ObjIntConsumerWithException to a lifted
ObjIntConsumer ignoring exception. |
static <T,E extends Exception> |
ignored(ObjIntConsumerWithException<T,E> operation) |
Converts a
ObjIntConsumerWithException to a lifted
ObjIntConsumer ignoring exception. |
static <T,E extends Exception> |
lifted(ObjIntConsumerWithException<T,E> operation) |
Converts a
ObjIntConsumerWithException to a lifted
ObjIntConsumer ignoring exception. |
default BiFunction<T,Integer,CompletionStage<Void>> |
stage() |
Converts this
ObjIntConsumerWithException to a staged
BiFunction that return a CompletionStage. |
static <T,E extends Exception> |
staged(ObjIntConsumerWithException<T,E> operation) |
Converts a
ObjIntConsumerWithException to a staged BiFunction
. |
default ObjIntConsumer<T> |
uncheck() |
Converts this
ObjIntConsumerWithException to a ObjIntConsumer
that wraps exception to RuntimeException. |
static <T,E extends Exception> |
unchecked(ObjIntConsumerWithException<T,E> operation) |
Converts a
ObjIntConsumerWithException to a ObjIntConsumer
that wraps exception to RuntimeException. |
static <T,E extends Exception> |
unchecked(ObjIntConsumerWithException<T,E> operation,
Function<Exception,RuntimeException> exceptionMapper) |
Converts a
ObjIntConsumerWithException to a ObjIntConsumer
that wraps exception to RuntimeException by using the provided
mapping function. |
exceptionMapper, exceptionMapperForlift, notThrowingHandler, staged, throwingHandler, uncheckedvoid accept(T t, int value) throws E extends Exception
t - the first input argumentvalue - the second input argumentE - any exceptionE extends ExceptionObjIntConsumer.accept(Object,int)default ObjIntConsumer<T> uncheck()
ObjIntConsumerWithException to a ObjIntConsumer
that wraps exception to RuntimeException.uncheck in interface ExceptionHandlerSupport<T,E extends Exception>uncheck in interface NoReturnExceptionHandlerSupport<T,E extends Exception>unchecked(ObjIntConsumerWithException),
unchecked(ObjIntConsumerWithException, Function)default ObjIntConsumer<T> ignore()
ObjIntConsumerWithException to a lifted
ObjIntConsumer ignoring exception.ignore in interface ExceptionHandlerSupport<T,E extends Exception>ignore in interface NoReturnExceptionHandlerSupport<T,E extends Exception>ignored(ObjIntConsumerWithException)default BiFunction<T,Integer,CompletionStage<Void>> stage()
ObjIntConsumerWithException to a staged
BiFunction that return a CompletionStage.stage in interface NoReturnExceptionHandlerSupport<T,E extends Exception>static <T,E extends Exception> ObjIntConsumerWithException<T,E> failing(Supplier<E> exceptionBuilder)
T - the type of the object argument to the operationE - the type of the exceptionexceptionBuilder - the supplier to create the exceptionstatic <T,E extends Exception> ObjIntConsumer<T> unchecked(ObjIntConsumerWithException<T,E> operation)
ObjIntConsumerWithException to a ObjIntConsumer
that wraps exception to RuntimeException.T - the type of the object argument to the operationE - the type of the potential exceptionoperation - to be uncheckedNullPointerException - if operation is nulluncheck(),
unchecked(ObjIntConsumerWithException, Function)static <T,E extends Exception> ObjIntConsumer<T> unchecked(ObjIntConsumerWithException<T,E> operation, Function<Exception,RuntimeException> exceptionMapper)
ObjIntConsumerWithException to a ObjIntConsumer
that wraps exception to RuntimeException by using the provided
mapping function.T - the type of the object argument to the operationE - the type of the potential exceptionoperation - the be uncheckedexceptionMapper - a function to convert the exception to the runtime exception.NullPointerException - if operation or exceptionMapper is nulluncheck(),
unchecked(ObjIntConsumerWithException)static <T,E extends Exception> ObjIntConsumer<T> lifted(ObjIntConsumerWithException<T,E> operation)
ObjIntConsumerWithException to a lifted
ObjIntConsumer ignoring exception.T - the type of the object argument to the operationE - the type of the potential exceptionoperation - to be liftedNullPointerException - if operation is nullNoReturnExceptionHandlerSupport.lift()static <T,E extends Exception> ObjIntConsumer<T> ignored(ObjIntConsumerWithException<T,E> operation)
ObjIntConsumerWithException to a lifted
ObjIntConsumer ignoring exception.T - the type of the object argument to the operationE - the type of the potential exceptionoperation - to be liftedNullPointerException - if operation is nullignore()static <T,E extends Exception> BiFunction<T,Integer,CompletionStage<Void>> staged(ObjIntConsumerWithException<T,E> operation)
ObjIntConsumerWithException to a staged BiFunction
.T - the type of the object argument to the operationE - the type of the potential exceptionoperation - to be stagedNullPointerException - if operation is nullstatic <T,E extends Exception> BiConsumerWithException<T,Integer,E> asBiConsumer(ObjIntConsumerWithException<T,E> operation)
ObjIntConsumerWithException to a
BiConsumerWithException returning null.T - the type of the object argument to the operationE - the type of the potential exceptionoperation - to be liftedNullPointerException - if operation is nullCopyright © 2019. All rights reserved.