org.apache.commons.collections.functors
Class OrPredicate
java.lang.Objectorg.apache.commons.collections.functors.OrPredicate
- Predicate, PredicateDecorator, Serializable
public final class OrPredicate
extends java.lang.Object
Predicate implementation that returns true if either of the predicates return true.
$Revision: 646777 $ $Date: 2008-04-10 13:33:15 +0100 (Thu, 10 Apr 2008) $
OrPredicate
public OrPredicate(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 either predicate returns true.
- evaluate in interface Predicate
object - the input object
- true if either decorated predicate returns 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-2008 Apache Software Foundation. All Rights Reserved.