E - the type of the potential exception of the functionExceptionHandlerSupport<F,F>, PrimitiveReturnExceptionHandlerSupport<DoubleBinaryOperator>@FunctionalInterface public interface DoubleBinaryOperatorWithException<E extends Exception> extends PrimitiveReturnExceptionHandlerSupport<DoubleBinaryOperator>
double-valued operands, may throw
exception and producing a double-valued result. This is the primitive
type specialization of BinaryOperatorWithException for
double.
double applyAsDouble(double
left, double right) throws E - The functional method.DoubleBinaryOperatorDoubleBinaryOperatorDoubleBinaryOperatorDoubleBinaryOperator| Modifier and Type | Method | Description |
|---|---|---|
double |
applyAsDouble(double left,
double 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(DoubleBinaryOperatorWithException<E> function) |
Converts a
DoubleBinaryOperatorWithException to a lifted
DoubleBinaryOperator with 0 as return value in case of
exception. |
static <E extends Exception> |
lifted(DoubleBinaryOperatorWithException<E> function) |
Converts a
DoubleBinaryOperatorWithException to a lifted
DoubleBinaryOperator with 0 as return value in case of
exception. |
static <E extends Exception> |
unchecked(DoubleBinaryOperatorWithException<E> function) |
Converts a
DoubleBinaryOperatorException to a
DoubleBinaryOperator that wraps exception to
RuntimeException. |
static <E extends Exception> |
unchecked(DoubleBinaryOperatorWithException<E> function,
Function<Exception,RuntimeException> exceptionMapper) |
Converts a
DoubleBinaryOperatorWithException to a
DoubleBinaryOperator that wraps exception to RuntimeException
by using the provided mapping function. |
default DoubleBinaryOperator |
uncheckOrIgnore(boolean uncheck) |
Used internally to implements the ignore or uncheck operation.
|
exceptionMapper, exceptionMapperForhandleException, ignore, lift, uncheckdouble applyAsDouble(double left,
double right)
throws E extends Exception
left - the first operandright - the second operandE - any exceptionE extends ExceptionDoubleBinaryOperator.applyAsDouble(double, double)default DoubleBinaryOperator 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> DoubleBinaryOperatorWithException<E> failing(Supplier<E> exceptionBuilder)
E - the type of the exceptionexceptionBuilder - the supplier to create the exceptionstatic <E extends Exception> DoubleBinaryOperator unchecked(DoubleBinaryOperatorWithException<E> function)
DoubleBinaryOperatorException to a
DoubleBinaryOperator that wraps exception to
RuntimeException.E - the type of the potential exceptionfunction - to be uncheckedNullPointerException - if function is nullPrimitiveReturnExceptionHandlerSupport.uncheck(),
unchecked(DoubleBinaryOperatorWithException, Function)static <E extends Exception> DoubleBinaryOperator unchecked(DoubleBinaryOperatorWithException<E> function, Function<Exception,RuntimeException> exceptionMapper)
DoubleBinaryOperatorWithException to a
DoubleBinaryOperator that wraps 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(DoubleBinaryOperatorWithException)static <E extends Exception> DoubleBinaryOperator lifted(DoubleBinaryOperatorWithException<E> function)
DoubleBinaryOperatorWithException to a lifted
DoubleBinaryOperator 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> DoubleBinaryOperator ignored(DoubleBinaryOperatorWithException<E> function)
DoubleBinaryOperatorWithException to a lifted
DoubleBinaryOperator 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.