E - the type of the potential exception of the functionExceptionHandlerSupport<F,F>, PrimitiveReturnExceptionHandlerSupport<IntToDoubleFunction>@FunctionalInterface public interface IntToDoubleFunctionWithException<E extends Exception> extends PrimitiveReturnExceptionHandlerSupport<IntToDoubleFunction>
int-to-double primitive specialization for
FunctionWithException.
double applyAsDouble(int value) throws
E - The functional method.IntToDoubleFunctionIntToDoubleFunctionIntToDoubleFunctionIntToDoubleFunction| Modifier and Type | Method | Description |
|---|---|---|
double |
applyAsDouble(int value) |
Applies this function to the given argument.
|
static <E extends Exception> |
failing(Supplier<E> exceptionBuilder) |
Returns a function that always throw exception.
|
static <E extends Exception> |
ignored(IntToDoubleFunctionWithException<E> function) |
Converts a
IntToDoubleFunctionWithException to a lifted
IntToDoubleFunction returning 0 in case of exception. |
static <E extends Exception> |
lifted(IntToDoubleFunctionWithException<E> function) |
Converts a
IntToDoubleFunctionWithException to a lifted
IntToDoubleFunction returning 0 in case of exception. |
static <E extends Exception> |
unchecked(IntToDoubleFunctionWithException<E> function) |
Converts a
IntToDoubleFunctionWithException to a
IntToDoubleFunction that wraps exception to RuntimeException. |
static <E extends Exception> |
unchecked(IntToDoubleFunctionWithException<E> function,
Function<Exception,RuntimeException> exceptionMapper) |
Converts a
IntToDoubleFunctionWithException to a
IntToDoubleFunction that wraps exception to RuntimeException
by using the provided mapping function. |
default IntToDoubleFunction |
uncheckOrIgnore(boolean uncheck) |
Used internally to implements the ignore or uncheck operation.
|
exceptionMapper, exceptionMapperForhandleException, ignore, lift, uncheckdouble applyAsDouble(int value)
throws E extends Exception
value - the function argumentE - any exceptionE extends ExceptionIntToDoubleFunction.applyAsDouble(int)default IntToDoubleFunction 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> IntToDoubleFunctionWithException<E> failing(Supplier<E> exceptionBuilder)
E - the type of the exceptionexceptionBuilder - the supplier to create the exceptionstatic <E extends Exception> IntToDoubleFunction unchecked(IntToDoubleFunctionWithException<E> function)
IntToDoubleFunctionWithException to a
IntToDoubleFunction that wraps exception to RuntimeException.E - the type of the potential exceptionfunction - to be uncheckedNullPointerException - if function is nullPrimitiveReturnExceptionHandlerSupport.uncheck(),
unchecked(IntToDoubleFunctionWithException, Function)static <E extends Exception> IntToDoubleFunction unchecked(IntToDoubleFunctionWithException<E> function, Function<Exception,RuntimeException> exceptionMapper)
IntToDoubleFunctionWithException to a
IntToDoubleFunction 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(IntToDoubleFunctionWithException)static <E extends Exception> IntToDoubleFunction lifted(IntToDoubleFunctionWithException<E> function)
IntToDoubleFunctionWithException to a lifted
IntToDoubleFunction returning 0 in case of exception.E - the type of the potential exceptionfunction - to be liftedNullPointerException - if function is nullPrimitiveReturnExceptionHandlerSupport.lift()static <E extends Exception> IntToDoubleFunction ignored(IntToDoubleFunctionWithException<E> function)
IntToDoubleFunctionWithException to a lifted
IntToDoubleFunction returning 0 in case of exception.E - the type of the potential exceptionfunction - to be liftedNullPointerException - if function is nullPrimitiveReturnExceptionHandlerSupport.ignore()Copyright © 2019. All rights reserved.