T
- some generic flagU
- some generic flagE
- The extension@FunctionalInterface public interface ToIntBiFunctionWithThrowable<T,U,E extends Throwable> extends ToIntBiFunction<T,U>
Modifier and Type | Method and Description |
---|---|
default int |
applyAsInt(T v1,
U v2)
Overridden method of ToIntBiFunctionWithThrowable that will call applyAsIntWithThrowable, but catching any exceptions.
|
int |
applyAsIntWithThrowable(T v1,
U v2)
Functional method that will throw exceptions.
|
static <T,U,E extends Throwable> |
asToIntBiFunctionWithThrowable(ToIntBiFunction<T,U> tointbifunction)
Utility method to convert ToIntBiFunctionWithThrowable
|
static <T,U,E extends Throwable> |
aToIntBiFunctionThatUnsafelyThrowsUnchecked(ToIntBiFunctionWithThrowable<T,U,E> tointbifunctionwiththrowable)
Utility method to unwrap lambdas of type ToIntBiFunction and withUncheckedThrowable any Exception
|
static <T,U,E extends Throwable> |
castToIntBiFunctionWithThrowable(ToIntBiFunctionWithThrowable<T,U,E> tointbifunctionwiththrowable)
Utility method to mark lambdas of type ToIntBiFunctionWithThrowable
|
default ToIntBiFunctionWithThrowable<T,U,E> |
onException(BiConsumer<Throwable,Object[]> consumer) |
default ToIntBiFunctionWithThrowable<T,U,E> |
onException(Consumer<Throwable> consumer) |
default ToIntBiFunction<T,U> |
thatReturnsOnCatch(int defaultReturnValue) |
default BiFunction<T,U,OptionalInt> |
thatReturnsOptional() |
default ToIntBiFunction<T,U> |
thatUnsafelyThrowsUnchecked() |
default ToIntBiFunctionWithThrowable<T,U,E> |
withLogging()
Will log WARNING level exceptions on logger if they occur within the interface
|
default ToIntBiFunctionWithThrowable<T,U,E> |
withLogging(org.slf4j.Logger logger)
Will log WARNING level exceptions on logger if they occur within the interface
|
default ToIntBiFunctionWithThrowable<T,U,E> |
withLogging(org.slf4j.Logger logger,
String message) |
static <T,U,E extends Throwable> ToIntBiFunctionWithThrowable<T,U,E> castToIntBiFunctionWithThrowable(ToIntBiFunctionWithThrowable<T,U,E> tointbifunctionwiththrowable)
T
- Generic that corresponds to the same generic on ToIntBiFunctionU
- Generic that corresponds to the same generic on ToIntBiFunctionE
- The type this interface is allowed to throwtointbifunctionwiththrowable
- The interface instancestatic <T,U,E extends Throwable> ToIntBiFunction<T,U> aToIntBiFunctionThatUnsafelyThrowsUnchecked(ToIntBiFunctionWithThrowable<T,U,E> tointbifunctionwiththrowable) throws E extends Throwable
T
- Generic that corresponds to the same generic on ToIntBiFunctionU
- Generic that corresponds to the same generic on ToIntBiFunctionE
- The type this interface is allowed to throwtointbifunctionwiththrowable
- The interface instanceE
- the original Exception from tointbifunctionwiththrowableE extends Throwable
static <T,U,E extends Throwable> ToIntBiFunctionWithThrowable<T,U,E> asToIntBiFunctionWithThrowable(ToIntBiFunction<T,U> tointbifunction)
T
- Generic that corresponds to the same generic on ToIntBiFunctionU
- Generic that corresponds to the same generic on ToIntBiFunctionE
- The type this interface is allowed to throwtointbifunction
- The interface instancedefault int applyAsInt(T v1, U v2)
applyAsInt
in interface ToIntBiFunction<T,U>
v1
- parameter to overridden methodv2
- parameter to overridden methodint applyAsIntWithThrowable(T v1, U v2) throws E extends Throwable
default BiFunction<T,U,OptionalInt> thatReturnsOptional()
default ToIntBiFunction<T,U> thatReturnsOnCatch(int defaultReturnValue)
defaultReturnValue
- A value to return if any throwable is caught.default ToIntBiFunction<T,U> thatUnsafelyThrowsUnchecked() throws E extends Throwable
default ToIntBiFunctionWithThrowable<T,U,E> withLogging(org.slf4j.Logger logger, String message)
logger
- The logger to log exceptions onmessage
- A message to use for logging exceptionsdefault ToIntBiFunctionWithThrowable<T,U,E> withLogging(org.slf4j.Logger logger)
logger
- The logger instance to log exceptions ondefault ToIntBiFunctionWithThrowable<T,U,E> withLogging()
default ToIntBiFunctionWithThrowable<T,U,E> onException(Consumer<Throwable> consumer)
consumer
- An exception consumer.default ToIntBiFunctionWithThrowable<T,U,E> onException(BiConsumer<Throwable,Object[]> consumer)
consumer
- An exception consumer.Copyright © 2017. All rights reserved.