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