E - the type of the potential exception of the functionExceptionHandlerSupport<F,F>, PrimitiveReturnExceptionHandlerSupport<IntBinaryOperator>@FunctionalInterface public interface IntBinaryOperatorWithException<E extends Exception> extends PrimitiveReturnExceptionHandlerSupport<IntBinaryOperator>
int-valued operands, may thrown
exception and producing an int-valued result. This is the primitive
type specialization of BinaryOperatorWithException for int.
int applyAsInt(int left, int right)
throws E - The functional method.IntBinaryOperatorIntBinaryOperatorIntBinaryOperatorIntBinaryOperator| Modifier and Type | Method | Description |
|---|---|---|
int |
applyAsInt(int left,
int right) |
Applies this operator to the given operands.
|
static <E extends Exception> |
failing(Supplier<E> exceptionBuilder) |
Returns a function that always throw exception.
|
static <E extends Exception> |
ignored(IntBinaryOperatorWithException<E> function) |
Converts a
IntBinaryOperatorWithException to a lifted
IntBinaryOperator with 0 as return value in case of
exception. |
static <E extends Exception> |
lifted(IntBinaryOperatorWithException<E> function) |
Converts a
IntBinaryOperatorWithException to a lifted
IntBinaryOperator with 0 as return value in case of
exception. |
static <E extends Exception> |
unchecked(IntBinaryOperatorWithException<E> function) |
Converts a
IntBinaryOperatorWithException to a
IntBinaryOperator that convert exception to RuntimeException. |
static <E extends Exception> |
unchecked(IntBinaryOperatorWithException<E> function,
Function<Exception,RuntimeException> exceptionMapper) |
Converts a
IntBinaryOperatorWithException to a
IntBinaryOperator that convert exception to RuntimeException
by using the provided mapping function. |
default IntBinaryOperator |
uncheckOrIgnore(boolean uncheck) |
Used internally to implements the ignore or uncheck operation.
|
exceptionMapper, exceptionMapperForhandleException, ignore, lift, uncheckint applyAsInt(int left,
int right)
throws E extends Exception
left - the first operandright - the second operandE - any exceptionE extends ExceptionIntBinaryOperator.applyAsInt(int, int)default IntBinaryOperator uncheckOrIgnore(boolean uncheck)
PrimitiveReturnExceptionHandlerSupportuncheckOrIgnore in interface PrimitiveReturnExceptionHandlerSupport<E extends Exception>uncheck - create unchecked version of the function when true, else ignored
version.static <E extends Exception> IntBinaryOperatorWithException<E> failing(Supplier<E> exceptionBuilder)
E - the type of the exceptionexceptionBuilder - the supplier to create the exceptionstatic <E extends Exception> IntBinaryOperator unchecked(IntBinaryOperatorWithException<E> function)
IntBinaryOperatorWithException to a
IntBinaryOperator that convert exception to RuntimeException.E - the type of the potential exceptionfunction - to be uncheckedNullPointerException - if function is nullPrimitiveReturnExceptionHandlerSupport.uncheck(),
unchecked(IntBinaryOperatorWithException, Function)static <E extends Exception> IntBinaryOperator unchecked(IntBinaryOperatorWithException<E> function, Function<Exception,RuntimeException> exceptionMapper)
IntBinaryOperatorWithException to a
IntBinaryOperator that convert exception to RuntimeException
by using the provided mapping function.E - the type of the potential exceptionfunction - the be uncheckedexceptionMapper - a function to convert the exception to the runtime exception.NullPointerException - if function or exceptionMapper is nullPrimitiveReturnExceptionHandlerSupport.uncheck(),
unchecked(IntBinaryOperatorWithException)static <E extends Exception> IntBinaryOperator lifted(IntBinaryOperatorWithException<E> function)
IntBinaryOperatorWithException to a lifted
IntBinaryOperator with 0 as return value in case of
exception.E - the type of the potential exceptionfunction - to be liftedNullPointerException - if function is nullPrimitiveReturnExceptionHandlerSupport.lift()static <E extends Exception> IntBinaryOperator ignored(IntBinaryOperatorWithException<E> function)
IntBinaryOperatorWithException to a lifted
IntBinaryOperator with 0 as return value in case of
exception.E - the type of the potential exceptionfunction - to be liftedNullPointerException - if function is nullPrimitiveReturnExceptionHandlerSupport.ignore()Copyright © 2019. All rights reserved.