E - The extension@FunctionalInterface public interface DoubleToIntFunctionWithThrowable<E extends Throwable> extends DoubleToIntFunction
| Modifier and Type | Method and Description |
|---|---|
static <E extends Throwable> |
aDoubleToIntFunctionThatUnsafelyThrowsUnchecked(DoubleToIntFunctionWithThrowable<E> doubletointfunctionwiththrowable)
Utility method to unwrap lambdas of type DoubleToIntFunction and withUncheckedThrowable any Exception
|
default int |
applyAsInt(double v1)
Overridden method of DoubleToIntFunctionWithThrowable that will call applyAsIntWithThrowable, but catching any exceptions.
|
int |
applyAsIntWithThrowable(double v1)
Functional method that will throw exceptions.
|
static <E extends Throwable> |
asDoubleToIntFunctionWithThrowable(DoubleToIntFunction doubletointfunction)
Utility method to convert DoubleToIntFunctionWithThrowable
|
static <E extends Throwable> |
castDoubleToIntFunctionWithThrowable(DoubleToIntFunctionWithThrowable<E> doubletointfunctionwiththrowable)
Utility method to mark lambdas of type DoubleToIntFunctionWithThrowable
|
default DoubleToIntFunctionWithThrowable<E> |
onException(BiConsumer<Throwable,Object[]> consumer) |
default DoubleToIntFunctionWithThrowable<E> |
onException(Consumer<Throwable> consumer) |
default DoubleToIntFunction |
thatReturnsOnCatch(int defaultReturnValue) |
default DoubleToIntFunction |
thatUnsafelyThrowsUnchecked() |
default DoubleToIntFunctionWithThrowable<E> |
withLogging()
Will log WARNING level exceptions on logger if they occur within the interface
|
default DoubleToIntFunctionWithThrowable<E> |
withLogging(org.slf4j.Logger logger)
Will log WARNING level exceptions on logger if they occur within the interface
|
default DoubleToIntFunctionWithThrowable<E> |
withLogging(org.slf4j.Logger logger,
String message) |
static <E extends Throwable> DoubleToIntFunctionWithThrowable<E> castDoubleToIntFunctionWithThrowable(DoubleToIntFunctionWithThrowable<E> doubletointfunctionwiththrowable)
E - The type this interface is allowed to throwdoubletointfunctionwiththrowable - The interface instancestatic <E extends Throwable> DoubleToIntFunction aDoubleToIntFunctionThatUnsafelyThrowsUnchecked(DoubleToIntFunctionWithThrowable<E> doubletointfunctionwiththrowable) throws E extends Throwable
E - The type this interface is allowed to throwdoubletointfunctionwiththrowable - The interface instanceE - the original Exception from doubletointfunctionwiththrowableE extends Throwablestatic <E extends Throwable> DoubleToIntFunctionWithThrowable<E> asDoubleToIntFunctionWithThrowable(DoubleToIntFunction doubletointfunction)
E - The type this interface is allowed to throwdoubletointfunction - The interface instancedefault int applyAsInt(double v1)
applyAsInt in interface DoubleToIntFunctionv1 - parameter to overridden methodint applyAsIntWithThrowable(double v1)
throws E extends Throwable
default DoubleToIntFunction thatReturnsOnCatch(int defaultReturnValue)
defaultReturnValue - A value to return if any throwable is caught.default DoubleToIntFunction thatUnsafelyThrowsUnchecked() throws E extends Throwable
default DoubleToIntFunctionWithThrowable<E> withLogging(org.slf4j.Logger logger, String message)
logger - The logger to log exceptions onmessage - A message to use for logging exceptionsdefault DoubleToIntFunctionWithThrowable<E> withLogging(org.slf4j.Logger logger)
logger - The logger instance to log exceptions ondefault DoubleToIntFunctionWithThrowable<E> withLogging()
default DoubleToIntFunctionWithThrowable<E> onException(Consumer<Throwable> consumer)
consumer - An exception consumer.default DoubleToIntFunctionWithThrowable<E> onException(BiConsumer<Throwable,Object[]> consumer)
consumer - An exception consumer.Copyright © 2017. All rights reserved.