org.apache.commons.collections.functors
public final class AndPredicate extends Object implements Predicate, PredicateDecorator, Serializable
Since: Commons Collections 3.0
Version: $Revision: 646777 $ $Date: 2008-04-10 13:33:15 +0100 (Thu, 10 Apr 2008) $
Constructor Summary | |
---|---|
AndPredicate(Predicate predicate1, Predicate predicate2)
Constructor that performs no validation.
|
Method Summary | |
---|---|
boolean | evaluate(Object object)
Evaluates the predicate returning true if both predicates return true.
|
static Predicate | getInstance(Predicate predicate1, Predicate predicate2)
Factory to create the predicate.
|
Predicate[] | getPredicates()
Gets the two predicates being decorated as an array.
|
getInstance
if you want that.
Parameters: predicate1 the first predicate to check, not null predicate2 the second predicate to check, not null
Parameters: object the input object
Returns: true if both decorated predicates return true
Parameters: predicate1 the first predicate to check, not null predicate2 the second predicate to check, not null
Returns: the and
predicate
Throws: IllegalArgumentException if either predicate is null
Returns: the predicates
Since: Commons Collections 3.1