E
- The extension@FunctionalInterface public interface DoubleToLongFunctionWithThrowable<E extends Throwable> extends DoubleToLongFunction
Modifier and Type | Method and Description |
---|---|
static <E extends Throwable> |
aDoubleToLongFunctionThatUnsafelyThrowsUnchecked(DoubleToLongFunctionWithThrowable<E> doubletolongfunctionwiththrowable)
Utility method to unwrap lambdas of type DoubleToLongFunction and withUncheckedThrowable any Exception
|
default long |
applyAsLong(double v1)
Overridden method of DoubleToLongFunctionWithThrowable that will call applyAsLongWithThrowable, but catching any exceptions.
|
long |
applyAsLongWithThrowable(double v1)
Functional method that will throw exceptions.
|
static <E extends Throwable> |
asDoubleToLongFunctionWithThrowable(DoubleToLongFunction doubletolongfunction)
Utility method to convert DoubleToLongFunctionWithThrowable
|
static <E extends Throwable> |
castDoubleToLongFunctionWithThrowable(DoubleToLongFunctionWithThrowable<E> doubletolongfunctionwiththrowable)
Utility method to mark lambdas of type DoubleToLongFunctionWithThrowable
|
default DoubleToLongFunctionWithThrowable<E> |
onException(BiConsumer<Throwable,Object[]> consumer) |
default DoubleToLongFunctionWithThrowable<E> |
onException(Consumer<Throwable> consumer) |
default DoubleToLongFunction |
thatReturnsOnCatch(long defaultReturnValue) |
default DoubleToLongFunction |
thatUnsafelyThrowsUnchecked() |
default DoubleToLongFunctionWithThrowable<E> |
withLogging()
Will log WARNING level exceptions on logger if they occur within the interface
|
default DoubleToLongFunctionWithThrowable<E> |
withLogging(org.slf4j.Logger logger)
Will log WARNING level exceptions on logger if they occur within the interface
|
default DoubleToLongFunctionWithThrowable<E> |
withLogging(org.slf4j.Logger logger,
String message) |
static <E extends Throwable> DoubleToLongFunctionWithThrowable<E> castDoubleToLongFunctionWithThrowable(DoubleToLongFunctionWithThrowable<E> doubletolongfunctionwiththrowable)
E
- The type this interface is allowed to throwdoubletolongfunctionwiththrowable
- The interface instancestatic <E extends Throwable> DoubleToLongFunction aDoubleToLongFunctionThatUnsafelyThrowsUnchecked(DoubleToLongFunctionWithThrowable<E> doubletolongfunctionwiththrowable) throws E extends Throwable
E
- The type this interface is allowed to throwdoubletolongfunctionwiththrowable
- The interface instanceE
- the original Exception from doubletolongfunctionwiththrowableE extends Throwable
static <E extends Throwable> DoubleToLongFunctionWithThrowable<E> asDoubleToLongFunctionWithThrowable(DoubleToLongFunction doubletolongfunction)
E
- The type this interface is allowed to throwdoubletolongfunction
- The interface instancedefault long applyAsLong(double v1)
applyAsLong
in interface DoubleToLongFunction
v1
- parameter to overridden methodlong applyAsLongWithThrowable(double v1) throws E extends Throwable
default DoubleToLongFunction thatReturnsOnCatch(long defaultReturnValue)
defaultReturnValue
- A value to return if any throwable is caught.default DoubleToLongFunction thatUnsafelyThrowsUnchecked() throws E extends Throwable
default DoubleToLongFunctionWithThrowable<E> withLogging(org.slf4j.Logger logger, String message)
logger
- The logger to log exceptions onmessage
- A message to use for logging exceptionsdefault DoubleToLongFunctionWithThrowable<E> withLogging(org.slf4j.Logger logger)
logger
- The logger instance to log exceptions ondefault DoubleToLongFunctionWithThrowable<E> withLogging()
default DoubleToLongFunctionWithThrowable<E> onException(Consumer<Throwable> consumer)
consumer
- An exception consumer.default DoubleToLongFunctionWithThrowable<E> onException(BiConsumer<Throwable,Object[]> consumer)
consumer
- An exception consumer.Copyright © 2017. All rights reserved.