T
- the type that the predicate queriespublic interface Predicate<T>
A Predicate
is the object equivalent of an if
statement.
It uses the input object to return a true or false value, and is often used in
validation or filtering.
Modifier and Type | Method and Description |
---|---|
boolean |
evaluate(T object)
Use the specified parameter to perform a test that returns true or false.
|
boolean evaluate(T object)
object
- the object to evaluate, should not be changedjava.lang.ClassCastException
- (runtime) if the input is the wrong classjava.lang.IllegalArgumentException
- (runtime) if the input is invalid