E
- The extension@FunctionalInterface public interface LongBinaryOperatorWithThrowable<E extends Throwable> extends LongBinaryOperator
Modifier and Type | Method and Description |
---|---|
static <E extends Throwable> |
aLongBinaryOperatorThatUnsafelyThrowsUnchecked(LongBinaryOperatorWithThrowable<E> longbinaryoperatorwiththrowable)
Utility method to unwrap lambdas of type LongBinaryOperator and withUncheckedThrowable any Exception
|
default long |
applyAsLong(long v1,
long v2)
Overridden method of LongBinaryOperatorWithThrowable that will call applyAsLongWithThrowable, but catching any exceptions.
|
long |
applyAsLongWithThrowable(long v1,
long v2)
Functional method that will throw exceptions.
|
static <E extends Throwable> |
asLongBinaryOperatorWithThrowable(LongBinaryOperator longbinaryoperator)
Utility method to convert LongBinaryOperatorWithThrowable
|
static <E extends Throwable> |
castLongBinaryOperatorWithThrowable(LongBinaryOperatorWithThrowable<E> longbinaryoperatorwiththrowable)
Utility method to mark lambdas of type LongBinaryOperatorWithThrowable
|
default LongBinaryOperatorWithThrowable<E> |
onException(BiConsumer<Throwable,Object[]> consumer) |
default LongBinaryOperatorWithThrowable<E> |
onException(Consumer<Throwable> consumer) |
default LongBinaryOperator |
thatReturnsOnCatch(long defaultReturnValue) |
default LongBinaryOperator |
thatUnsafelyThrowsUnchecked() |
default LongBinaryOperatorWithThrowable<E> |
withLogging()
Will log WARNING level exceptions on logger if they occur within the interface
|
default LongBinaryOperatorWithThrowable<E> |
withLogging(org.slf4j.Logger logger)
Will log WARNING level exceptions on logger if they occur within the interface
|
default LongBinaryOperatorWithThrowable<E> |
withLogging(org.slf4j.Logger logger,
String message) |
static <E extends Throwable> LongBinaryOperatorWithThrowable<E> castLongBinaryOperatorWithThrowable(LongBinaryOperatorWithThrowable<E> longbinaryoperatorwiththrowable)
E
- The type this interface is allowed to throwlongbinaryoperatorwiththrowable
- The interface instancestatic <E extends Throwable> LongBinaryOperator aLongBinaryOperatorThatUnsafelyThrowsUnchecked(LongBinaryOperatorWithThrowable<E> longbinaryoperatorwiththrowable) throws E extends Throwable
E
- The type this interface is allowed to throwlongbinaryoperatorwiththrowable
- The interface instanceE
- the original Exception from longbinaryoperatorwiththrowableE extends Throwable
static <E extends Throwable> LongBinaryOperatorWithThrowable<E> asLongBinaryOperatorWithThrowable(LongBinaryOperator longbinaryoperator)
E
- The type this interface is allowed to throwlongbinaryoperator
- The interface instancedefault long applyAsLong(long v1, long v2)
applyAsLong
in interface LongBinaryOperator
v1
- parameter to overridden methodv2
- parameter to overridden methodlong applyAsLongWithThrowable(long v1, long v2) throws E extends Throwable
default LongBinaryOperator thatReturnsOnCatch(long defaultReturnValue)
defaultReturnValue
- A value to return if any throwable is caught.default LongBinaryOperator thatUnsafelyThrowsUnchecked() throws E extends Throwable
default LongBinaryOperatorWithThrowable<E> withLogging(org.slf4j.Logger logger, String message)
logger
- The logger to log exceptions onmessage
- A message to use for logging exceptionsdefault LongBinaryOperatorWithThrowable<E> withLogging(org.slf4j.Logger logger)
logger
- The logger instance to log exceptions ondefault LongBinaryOperatorWithThrowable<E> withLogging()
default LongBinaryOperatorWithThrowable<E> onException(Consumer<Throwable> consumer)
consumer
- An exception consumer.default LongBinaryOperatorWithThrowable<E> onException(BiConsumer<Throwable,Object[]> consumer)
consumer
- An exception consumer.Copyright © 2017. All rights reserved.