E
- The extension@FunctionalInterface public interface DoublePredicateWithThrowable<E extends Throwable> extends DoublePredicate
Modifier and Type | Method and Description |
---|---|
static <E extends Throwable> |
aDoublePredicateThatUnsafelyThrowsUnchecked(DoublePredicateWithThrowable<E> doublepredicatewiththrowable)
Utility method to unwrap lambdas of type DoublePredicate and withUncheckedThrowable any Exception
|
static <E extends Throwable> |
asDoublePredicateWithThrowable(DoublePredicate doublepredicate)
Utility method to convert DoublePredicateWithThrowable
|
static <E extends Throwable> |
castDoublePredicateWithThrowable(DoublePredicateWithThrowable<E> doublepredicatewiththrowable)
Utility method to mark lambdas of type DoublePredicateWithThrowable
|
default DoublePredicateWithThrowable<E> |
onException(BiConsumer<Throwable,Object[]> consumer) |
default DoublePredicateWithThrowable<E> |
onException(Consumer<Throwable> consumer) |
default boolean |
test(double v1)
Overridden method of DoublePredicateWithThrowable that will call testWithThrowable, but catching any exceptions.
|
boolean |
testWithThrowable(double v1)
Functional method that will throw exceptions.
|
default DoublePredicate |
thatReturnsOnCatch(boolean defaultReturnValue) |
default DoublePredicate |
thatUnsafelyThrowsUnchecked() |
default DoublePredicateWithThrowable<E> |
withLogging()
Will log WARNING level exceptions on logger if they occur within the interface
|
default DoublePredicateWithThrowable<E> |
withLogging(org.slf4j.Logger logger)
Will log WARNING level exceptions on logger if they occur within the interface
|
default DoublePredicateWithThrowable<E> |
withLogging(org.slf4j.Logger logger,
String message) |
and, negate, or
static <E extends Throwable> DoublePredicateWithThrowable<E> castDoublePredicateWithThrowable(DoublePredicateWithThrowable<E> doublepredicatewiththrowable)
E
- The type this interface is allowed to throwdoublepredicatewiththrowable
- The interface instancestatic <E extends Throwable> DoublePredicate aDoublePredicateThatUnsafelyThrowsUnchecked(DoublePredicateWithThrowable<E> doublepredicatewiththrowable) throws E extends Throwable
E
- The type this interface is allowed to throwdoublepredicatewiththrowable
- The interface instanceE
- the original Exception from doublepredicatewiththrowableE extends Throwable
static <E extends Throwable> DoublePredicateWithThrowable<E> asDoublePredicateWithThrowable(DoublePredicate doublepredicate)
E
- The type this interface is allowed to throwdoublepredicate
- The interface instancedefault boolean test(double v1)
test
in interface DoublePredicate
v1
- parameter to overridden methodboolean testWithThrowable(double v1) throws E extends Throwable
default DoublePredicate thatReturnsOnCatch(boolean defaultReturnValue)
defaultReturnValue
- A value to return if any throwable is caught.default DoublePredicate thatUnsafelyThrowsUnchecked() throws E extends Throwable
default DoublePredicateWithThrowable<E> withLogging(org.slf4j.Logger logger, String message)
logger
- The logger to log exceptions onmessage
- A message to use for logging exceptionsdefault DoublePredicateWithThrowable<E> withLogging(org.slf4j.Logger logger)
logger
- The logger instance to log exceptions ondefault DoublePredicateWithThrowable<E> withLogging()
default DoublePredicateWithThrowable<E> onException(Consumer<Throwable> consumer)
consumer
- An exception consumer.default DoublePredicateWithThrowable<E> onException(BiConsumer<Throwable,Object[]> consumer)
consumer
- An exception consumer.Copyright © 2017. All rights reserved.