| java.lang.Object org.apache.commons.collections.functors.OrPredicate
OrPredicate | final public class OrPredicate implements Predicate,PredicateDecorator,Serializable(Code) | | Predicate implementation that returns true if either of the predicates return true.
since: Commons Collections 3.0 version: $Revision: 348444 $ $Date: 2005-11-23 14:06:56 +0000 (Wed, 23 Nov 2005) $ author: Stephen Colebourne |
OrPredicate | public OrPredicate(Predicate predicate1, Predicate predicate2)(Code) | | Constructor that performs no validation.
Use getInstance if you want that.
Parameters: predicate1 - the first predicate to check, not null Parameters: predicate2 - the second predicate to check, not null |
evaluate | public boolean evaluate(Object object)(Code) | | Evaluates the predicate returning true if either predicate returns true.
Parameters: object - the input object true if either decorated predicate returns true |
getInstance | public static Predicate getInstance(Predicate predicate1, Predicate predicate2)(Code) | | Factory to create the predicate.
Parameters: predicate1 - the first predicate to check, not null Parameters: predicate2 - the second predicate to check, not null the and predicate throws: IllegalArgumentException - if either predicate is null |
getPredicates | public Predicate[] getPredicates()(Code) | | Gets the two predicates being decorated as an array.
the predicates since: Commons Collections 3.1 |
|
|