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