Interface ThrowablePredicate<T>
- Type Parameters:
T
- the type of the input to the predicate
- All Superinterfaces:
Predicate<T>
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Represents a predicate (boolean-valued function) of one argument.
Permits checked exceptions unlike Predicate
This is a functional interface whose functional method is
test(Object)
.
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> ThrowablePredicate<T>
Returns a predicate that tests if two arguments are equal according toObjects.equals(Object, Object)
.default boolean
Evaluates this predicate on the given argument.boolean
testUnsafe
(T t) Evaluates this predicate on the given argument.
-
Method Details
-
testUnsafe
Evaluates this predicate on the given argument.- Parameters:
t
- the input argument- Returns:
true
if the input argument matches the predicate, otherwisefalse
- Throws:
Throwable
- occurred during processing
-
test
Evaluates this predicate on the given argument. -
isEqual
Returns a predicate that tests if two arguments are equal according toObjects.equals(Object, Object)
.- Type Parameters:
T
- the type of arguments to the predicate- Parameters:
targetRef
- the object reference with which to compare for equality, which may benull
- Returns:
- a predicate that tests if two arguments are equal according to
Objects.equals(Object, Object)
-