|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.commons.collections.functors.AndPredicate
Predicate implementation that returns true if both the predicates return true.
Constructor Summary | |
AndPredicate(Predicate predicate1,
Predicate predicate2)
Constructor that performs no validation. |
Method Summary | |
boolean |
evaluate(Object object)
Evaluates the predicate returning true if both predicates return true. |
static Predicate |
getInstance(Predicate predicate1,
Predicate predicate2)
Factory to create the predicate. |
Predicate[] |
getPredicates()
Gets the two predicates being decorated as an array. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public AndPredicate(Predicate predicate1, Predicate predicate2)
getInstance
if you want that.
predicate1
- the first predicate to check, not nullpredicate2
- the second predicate to check, not nullMethod Detail |
public static Predicate getInstance(Predicate predicate1, Predicate predicate2)
predicate1
- the first predicate to check, not nullpredicate2
- the second predicate to check, not null
and
predicate
IllegalArgumentException
- if either predicate is nullpublic boolean evaluate(Object object)
evaluate
in interface Predicate
object
- the input object
public Predicate[] getPredicates()
getPredicates
in interface PredicateDecorator
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |