org.apache.commons.collections.functors
Class AndPredicate
java.lang.Object
org.apache.commons.collections.functors.AndPredicate
- Predicate, PredicateDecorator, Serializable
public final class AndPredicate
extends java.lang.Object
Predicate implementation that returns true if both the predicates return true.
$Revision: 1.6 $ $Date: 2004/05/31 16:43:17 $
AndPredicate
public AndPredicate(Predicate predicate1,
Predicate predicate2)
Constructor that performs no validation.
Use getInstance
if you want that.
predicate1
- the first predicate to check, not nullpredicate2
- the second predicate to check, not null
evaluate
public boolean evaluate(Object object)
Evaluates the predicate returning true if both predicates return true.
- evaluate in interface Predicate
object
- the input object
- true if both decorated predicates return true
getInstance
public static Predicate getInstance(Predicate predicate1,
Predicate predicate2)
Factory to create the predicate.
predicate1
- the first predicate to check, not nullpredicate2
- the second predicate to check, not null
Copyright © 2001-2006 Apache Software Foundation. All Rights Reserved.