Module io.smallrye.common.function
Package io.smallrye.common.function
Interface ExceptionPredicate<T,E extends Exception>
- Type Parameters:
T- the argument typeE- the exception type
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
A one-argument predicate which can throw an exception.
-
Method Summary
Modifier and TypeMethodDescriptiondefault ExceptionPredicate<T, E> and(ExceptionPredicate<T, E> other) Returns a predicate which istrueonly when this and the given predicate returntrue.default ExceptionPredicate<T, E> not()Returns a predicate which istruewhen this predicate isfalse, and vice-versa.default ExceptionPredicate<T, E> or(ExceptionPredicate<T, E> other) Returns a predicate which istruewhen either this or the given predicate returntrue.booleanEvaluate this predicate on the given arguments.default <U> ExceptionBiPredicate<T, U, E> with(ExceptionPredicate<? super U, ? extends E> other) Returns a bi-predicate which istruewhen this predicate istruefor its first argument, and the given predicate istruefor its second argument.default ExceptionPredicate<T, E> xor(ExceptionPredicate<T, E> other) Returns a predicate which istruewhen either this or the given predicate (but not both) returntrue.
-
Method Details
-
test
Evaluate this predicate on the given arguments.- Parameters:
t- the first argument- Returns:
trueif the predicate passes,falseotherwise- Throws:
E- if an exception occurs
-
and
Returns a predicate which istrueonly when this and the given predicate returntrue.- Parameters:
other- the other predicate (must not benull)- Returns:
- a predicate which is
trueonly when this and the given predicate returntrue
-
or
Returns a predicate which istruewhen either this or the given predicate returntrue.- Parameters:
other- the other predicate (must not benull)- Returns:
- a predicate which is
truewhen either this or the given predicate returntrue
-
xor
Returns a predicate which istruewhen either this or the given predicate (but not both) returntrue.- Parameters:
other- the other predicate (must not benull)- Returns:
- a predicate which is
truewhen either this or the given predicate (but not both) returntrue
-
not
Returns a predicate which istruewhen this predicate isfalse, and vice-versa.- Returns:
- a predicate which is
truewhen this predicate isfalse, and vice-versa
-
with
Returns a bi-predicate which istruewhen this predicate istruefor its first argument, and the given predicate istruefor its second argument.- Type Parameters:
U- the second argument type- Parameters:
other- the other predicate (must not benull)- Returns:
- a bi-predicate which is
truewhen this predicate istruefor its first argument, and the given predicate istruefor its second argument
-