T - some generic flagU - some generic flagR - some generic flagE - The extension@FunctionalInterface public interface BiFunctionWithThrowable<T,U,R,E extends Throwable> extends BiFunction<T,U,R>
| Modifier and Type | Method and Description |
|---|---|
static <T,U,R,E extends Throwable> |
aBiFunctionThatUnsafelyThrowsUnchecked(BiFunctionWithThrowable<T,U,R,E> bifunctionwiththrowable)
Utility method to unwrap lambdas of type BiFunction and withUncheckedThrowable any Exception
|
default R |
apply(T v1,
U v2)
Overridden method of BiFunctionWithThrowable that will call applyWithThrowable, but catching any exceptions.
|
R |
applyWithThrowable(T v1,
U v2)
Functional method that will throw exceptions.
|
static <T,U,R,E extends Throwable> |
asBiFunctionWithThrowable(BiFunction<T,U,R> bifunction)
Utility method to convert BiFunctionWithThrowable
|
static <T,U,R,E extends Throwable> |
castBiFunctionWithThrowable(BiFunctionWithThrowable<T,U,R,E> bifunctionwiththrowable)
Utility method to mark lambdas of type BiFunctionWithThrowable
|
default BiFunctionWithThrowable<T,U,R,E> |
onException(BiConsumer<Throwable,Object[]> consumer) |
default BiFunctionWithThrowable<T,U,R,E> |
onException(Consumer<Throwable> consumer) |
default BiFunction<T,U,R> |
thatReturnsOnCatch(R defaultReturnValue) |
default BiFunction<T,U,Optional<R>> |
thatReturnsOptional() |
default BiFunction<T,U,R> |
thatUnsafelyThrowsUnchecked() |
default BiFunctionWithThrowable<T,U,R,E> |
withLogging()
Will log WARNING level exceptions on logger if they occur within the interface
|
default BiFunctionWithThrowable<T,U,R,E> |
withLogging(org.slf4j.Logger logger)
Will log WARNING level exceptions on logger if they occur within the interface
|
default BiFunctionWithThrowable<T,U,R,E> |
withLogging(org.slf4j.Logger logger,
String message) |
andThenstatic <T,U,R,E extends Throwable> BiFunctionWithThrowable<T,U,R,E> castBiFunctionWithThrowable(BiFunctionWithThrowable<T,U,R,E> bifunctionwiththrowable)
T - Generic that corresponds to the same generic on BiFunctionU - Generic that corresponds to the same generic on BiFunctionR - Generic that corresponds to the same generic on BiFunctionE - The type this interface is allowed to throwbifunctionwiththrowable - The interface instancestatic <T,U,R,E extends Throwable> BiFunction<T,U,R> aBiFunctionThatUnsafelyThrowsUnchecked(BiFunctionWithThrowable<T,U,R,E> bifunctionwiththrowable) throws E extends Throwable
T - Generic that corresponds to the same generic on BiFunctionU - Generic that corresponds to the same generic on BiFunctionR - Generic that corresponds to the same generic on BiFunctionE - The type this interface is allowed to throwbifunctionwiththrowable - The interface instanceE - the original Exception from bifunctionwiththrowableE extends Throwablestatic <T,U,R,E extends Throwable> BiFunctionWithThrowable<T,U,R,E> asBiFunctionWithThrowable(BiFunction<T,U,R> bifunction)
T - Generic that corresponds to the same generic on BiFunctionU - Generic that corresponds to the same generic on BiFunctionR - Generic that corresponds to the same generic on BiFunctionE - The type this interface is allowed to throwbifunction - The interface instancedefault R apply(T v1, U v2)
apply in interface BiFunction<T,U,R>v1 - parameter to overridden methodv2 - parameter to overridden methodR applyWithThrowable(T v1, U v2) throws E extends Throwable
default BiFunction<T,U,Optional<R>> thatReturnsOptional()
default BiFunction<T,U,R> thatReturnsOnCatch(R defaultReturnValue)
defaultReturnValue - A value to return if any throwable is caught.default BiFunction<T,U,R> thatUnsafelyThrowsUnchecked() throws E extends Throwable
default BiFunctionWithThrowable<T,U,R,E> withLogging(org.slf4j.Logger logger, String message)
logger - The logger to log exceptions onmessage - A message to use for logging exceptionsdefault BiFunctionWithThrowable<T,U,R,E> withLogging(org.slf4j.Logger logger)
logger - The logger instance to log exceptions ondefault BiFunctionWithThrowable<T,U,R,E> withLogging()
default BiFunctionWithThrowable<T,U,R,E> onException(Consumer<Throwable> consumer)
consumer - An exception consumer.default BiFunctionWithThrowable<T,U,R,E> onException(BiConsumer<Throwable,Object[]> consumer)
consumer - An exception consumer.Copyright © 2017. All rights reserved.