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