E - The extension@FunctionalInterface public interface LongToDoubleFunctionWithThrowable<E extends Throwable> extends LongToDoubleFunction
| Modifier and Type | Method and Description |
|---|---|
static <E extends Throwable> |
aLongToDoubleFunctionThatUnsafelyThrowsUnchecked(LongToDoubleFunctionWithThrowable<E> longtodoublefunctionwiththrowable)
Utility method to unwrap lambdas of type LongToDoubleFunction and withUncheckedThrowable any Exception
|
default double |
applyAsDouble(long v1)
Overridden method of LongToDoubleFunctionWithThrowable that will call applyAsDoubleWithThrowable, but catching any exceptions.
|
double |
applyAsDoubleWithThrowable(long v1)
Functional method that will throw exceptions.
|
static <E extends Throwable> |
asLongToDoubleFunctionWithThrowable(LongToDoubleFunction longtodoublefunction)
Utility method to convert LongToDoubleFunctionWithThrowable
|
static <E extends Throwable> |
castLongToDoubleFunctionWithThrowable(LongToDoubleFunctionWithThrowable<E> longtodoublefunctionwiththrowable)
Utility method to mark lambdas of type LongToDoubleFunctionWithThrowable
|
default LongToDoubleFunctionWithThrowable<E> |
onException(BiConsumer<Throwable,Object[]> consumer) |
default LongToDoubleFunctionWithThrowable<E> |
onException(Consumer<Throwable> consumer) |
default LongToDoubleFunction |
thatReturnsOnCatch(double defaultReturnValue) |
default LongToDoubleFunction |
thatUnsafelyThrowsUnchecked() |
default LongToDoubleFunctionWithThrowable<E> |
withLogging()
Will log WARNING level exceptions on logger if they occur within the interface
|
default LongToDoubleFunctionWithThrowable<E> |
withLogging(org.slf4j.Logger logger)
Will log WARNING level exceptions on logger if they occur within the interface
|
default LongToDoubleFunctionWithThrowable<E> |
withLogging(org.slf4j.Logger logger,
String message) |
static <E extends Throwable> LongToDoubleFunctionWithThrowable<E> castLongToDoubleFunctionWithThrowable(LongToDoubleFunctionWithThrowable<E> longtodoublefunctionwiththrowable)
E - The type this interface is allowed to throwlongtodoublefunctionwiththrowable - The interface instancestatic <E extends Throwable> LongToDoubleFunction aLongToDoubleFunctionThatUnsafelyThrowsUnchecked(LongToDoubleFunctionWithThrowable<E> longtodoublefunctionwiththrowable) throws E extends Throwable
E - The type this interface is allowed to throwlongtodoublefunctionwiththrowable - The interface instanceE - the original Exception from longtodoublefunctionwiththrowableE extends Throwablestatic <E extends Throwable> LongToDoubleFunctionWithThrowable<E> asLongToDoubleFunctionWithThrowable(LongToDoubleFunction longtodoublefunction)
E - The type this interface is allowed to throwlongtodoublefunction - The interface instancedefault double applyAsDouble(long v1)
applyAsDouble in interface LongToDoubleFunctionv1 - parameter to overridden methoddouble applyAsDoubleWithThrowable(long v1)
throws E extends Throwable
default LongToDoubleFunction thatReturnsOnCatch(double defaultReturnValue)
defaultReturnValue - A value to return if any throwable is caught.default LongToDoubleFunction thatUnsafelyThrowsUnchecked() throws E extends Throwable
default LongToDoubleFunctionWithThrowable<E> withLogging(org.slf4j.Logger logger, String message)
logger - The logger to log exceptions onmessage - A message to use for logging exceptionsdefault LongToDoubleFunctionWithThrowable<E> withLogging(org.slf4j.Logger logger)
logger - The logger instance to log exceptions ondefault LongToDoubleFunctionWithThrowable<E> withLogging()
default LongToDoubleFunctionWithThrowable<E> onException(Consumer<Throwable> consumer)
consumer - An exception consumer.default LongToDoubleFunctionWithThrowable<E> onException(BiConsumer<Throwable,Object[]> consumer)
consumer - An exception consumer.Copyright © 2017. All rights reserved.