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