org.apache.commons.collections.functors
public final class OrPredicate extends Object implements Predicate, PredicateDecorator, Serializable
Since: Commons Collections 3.0
Version: $Revision: 348444 $ $Date: 2005-11-23 14:06:56 +0000 (Wed, 23 Nov 2005) $
Constructor Summary | |
---|---|
OrPredicate(Predicate predicate1, Predicate predicate2)
Constructor that performs no validation.
|
Method Summary | |
---|---|
boolean | evaluate(Object object)
Evaluates the predicate returning true if either predicate returns 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 either decorated predicate returns 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