E - the type of the potential exception of the functionExceptionHandlerSupport<F,F>, PrimitiveReturnExceptionHandlerSupport<DoubleToIntFunction>@FunctionalInterface public interface DoubleToIntFunctionWithException<E extends Exception> extends PrimitiveReturnExceptionHandlerSupport<DoubleToIntFunction>
double-to-int primitive specialization for
FunctionWithException.
int applyAsInt(double value) throws
E - The functional method.DoubleToIntFunctionDoubleToIntFunctionDoubleToIntFunctionDoubleToIntFunction| Modifier and Type | Method | Description |
|---|---|---|
int |
applyAsInt(double 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(DoubleToIntFunctionWithException<E> function) |
Converts a
DoubleToIntFunctionWithException to a lifted
DoubleToIntFunction returning 0 in case of exception. |
static <E extends Exception> |
lifted(DoubleToIntFunctionWithException<E> function) |
Converts a
DoubleToIntFunctionWithException to a lifted
DoubleToIntFunction returning 0 in case of exception. |
static <E extends Exception> |
unchecked(DoubleToIntFunctionWithException<E> function) |
Converts a
DoubleToIntFunctionWithException to a
DoubleToIntFunction that wraps exception to RuntimeException. |
static <E extends Exception> |
unchecked(DoubleToIntFunctionWithException<E> function,
Function<Exception,RuntimeException> exceptionMapper) |
Converts a
DoubleToIntFunctionWithException to a
DoubleToIntFunction that wraps exception to RuntimeException
by using the provided mapping function. |
default DoubleToIntFunction |
uncheckOrIgnore(boolean uncheck) |
Used internally to implements the ignore or uncheck operation.
|
exceptionMapper, exceptionMapperForhandleException, ignore, lift, uncheckint applyAsInt(double value)
throws E extends Exception
value - the function argumentE - any exceptionE extends ExceptionDoubleToIntFunction.applyAsInt(double)default DoubleToIntFunction 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> DoubleToIntFunctionWithException<E> failing(Supplier<E> exceptionBuilder)
E - the type of the exceptionexceptionBuilder - the supplier to create the exceptionstatic <E extends Exception> DoubleToIntFunction unchecked(DoubleToIntFunctionWithException<E> function)
DoubleToIntFunctionWithException to a
DoubleToIntFunction that wraps exception to RuntimeException.E - the type of the potential exceptionfunction - to be uncheckedNullPointerException - if function is nullPrimitiveReturnExceptionHandlerSupport.uncheck(),
unchecked(DoubleToIntFunctionWithException, Function)static <E extends Exception> DoubleToIntFunction unchecked(DoubleToIntFunctionWithException<E> function, Function<Exception,RuntimeException> exceptionMapper)
DoubleToIntFunctionWithException to a
DoubleToIntFunction 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(DoubleToIntFunctionWithException)static <E extends Exception> DoubleToIntFunction lifted(DoubleToIntFunctionWithException<E> function)
DoubleToIntFunctionWithException to a lifted
DoubleToIntFunction 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> DoubleToIntFunction ignored(DoubleToIntFunctionWithException<E> function)
DoubleToIntFunctionWithException to a lifted
DoubleToIntFunction 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.