org.apache.commons.collections
public interface Predicate
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.
Standard implementations of common predicates are provided by {@link PredicateUtils}. These include true, false, instanceof, equals, and, or, not, method invokation and null testing.
Since: Commons Collections 1.0
Version: $Revision: 1.11 $ $Date: 2004/04/14 20:08:57 $
Method Summary | |
---|---|
boolean | evaluate(Object object)
Use the specified parameter to perform a test that returns true or false.
|
Parameters: object the object to evaluate, should not be changed
Returns: true or false
Throws: ClassCastException (runtime) if the input is the wrong class IllegalArgumentException (runtime) if the input is invalid FunctorException (runtime) if the predicate encounters a problem