T
- some generic flagU
- some generic flagE
- The extension@FunctionalInterface public interface ToLongBiFunctionWithThrowable<T,U,E extends Throwable> extends ToLongBiFunction<T,U>
Modifier and Type | Method and Description |
---|---|
default long |
applyAsLong(T v1,
U v2)
Overridden method of ToLongBiFunctionWithThrowable that will call applyAsLongWithThrowable, but catching any exceptions.
|
long |
applyAsLongWithThrowable(T v1,
U v2)
Functional method that will throw exceptions.
|
static <T,U,E extends Throwable> |
asToLongBiFunctionWithThrowable(ToLongBiFunction<T,U> tolongbifunction)
Utility method to convert ToLongBiFunctionWithThrowable
|
static <T,U,E extends Throwable> |
aToLongBiFunctionThatUnsafelyThrowsUnchecked(ToLongBiFunctionWithThrowable<T,U,E> tolongbifunctionwiththrowable)
Utility method to unwrap lambdas of type ToLongBiFunction and withUncheckedThrowable any Exception
|
static <T,U,E extends Throwable> |
castToLongBiFunctionWithThrowable(ToLongBiFunctionWithThrowable<T,U,E> tolongbifunctionwiththrowable)
Utility method to mark lambdas of type ToLongBiFunctionWithThrowable
|
default ToLongBiFunctionWithThrowable<T,U,E> |
onException(BiConsumer<Throwable,Object[]> consumer) |
default ToLongBiFunctionWithThrowable<T,U,E> |
onException(Consumer<Throwable> consumer) |
default ToLongBiFunction<T,U> |
thatReturnsOnCatch(long defaultReturnValue) |
default BiFunction<T,U,OptionalLong> |
thatReturnsOptional() |
default ToLongBiFunction<T,U> |
thatUnsafelyThrowsUnchecked() |
default ToLongBiFunctionWithThrowable<T,U,E> |
withLogging()
Will log WARNING level exceptions on logger if they occur within the interface
|
default ToLongBiFunctionWithThrowable<T,U,E> |
withLogging(org.slf4j.Logger logger)
Will log WARNING level exceptions on logger if they occur within the interface
|
default ToLongBiFunctionWithThrowable<T,U,E> |
withLogging(org.slf4j.Logger logger,
String message) |
static <T,U,E extends Throwable> ToLongBiFunctionWithThrowable<T,U,E> castToLongBiFunctionWithThrowable(ToLongBiFunctionWithThrowable<T,U,E> tolongbifunctionwiththrowable)
T
- Generic that corresponds to the same generic on ToLongBiFunctionU
- Generic that corresponds to the same generic on ToLongBiFunctionE
- The type this interface is allowed to throwtolongbifunctionwiththrowable
- The interface instancestatic <T,U,E extends Throwable> ToLongBiFunction<T,U> aToLongBiFunctionThatUnsafelyThrowsUnchecked(ToLongBiFunctionWithThrowable<T,U,E> tolongbifunctionwiththrowable) throws E extends Throwable
T
- Generic that corresponds to the same generic on ToLongBiFunctionU
- Generic that corresponds to the same generic on ToLongBiFunctionE
- The type this interface is allowed to throwtolongbifunctionwiththrowable
- The interface instanceE
- the original Exception from tolongbifunctionwiththrowableE extends Throwable
static <T,U,E extends Throwable> ToLongBiFunctionWithThrowable<T,U,E> asToLongBiFunctionWithThrowable(ToLongBiFunction<T,U> tolongbifunction)
T
- Generic that corresponds to the same generic on ToLongBiFunctionU
- Generic that corresponds to the same generic on ToLongBiFunctionE
- The type this interface is allowed to throwtolongbifunction
- The interface instancedefault long applyAsLong(T v1, U v2)
applyAsLong
in interface ToLongBiFunction<T,U>
v1
- parameter to overridden methodv2
- parameter to overridden methodlong applyAsLongWithThrowable(T v1, U v2) throws E extends Throwable
default BiFunction<T,U,OptionalLong> thatReturnsOptional()
default ToLongBiFunction<T,U> thatReturnsOnCatch(long defaultReturnValue)
defaultReturnValue
- A value to return if any throwable is caught.default ToLongBiFunction<T,U> thatUnsafelyThrowsUnchecked() throws E extends Throwable
default ToLongBiFunctionWithThrowable<T,U,E> withLogging(org.slf4j.Logger logger, String message)
logger
- The logger to log exceptions onmessage
- A message to use for logging exceptionsdefault ToLongBiFunctionWithThrowable<T,U,E> withLogging(org.slf4j.Logger logger)
logger
- The logger instance to log exceptions ondefault ToLongBiFunctionWithThrowable<T,U,E> withLogging()
default ToLongBiFunctionWithThrowable<T,U,E> onException(Consumer<Throwable> consumer)
consumer
- An exception consumer.default ToLongBiFunctionWithThrowable<T,U,E> onException(BiConsumer<Throwable,Object[]> consumer)
consumer
- An exception consumer.Copyright © 2017. All rights reserved.