org.apache.commons.collections.functors
public final class OrPredicate extends Object implements Predicate, PredicateDecorator, Serializable
Since: Commons Collections 3.0
Version: $Revision: 1.6 $ $Date: 2004/05/31 16:43:17 $
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