|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object wyvern.lib.predicates.AndPredicate
This predicate combines N other predicates with an AND operation. It returns true only when all sub-predicates return true.
Constructor Summary | |
AndPredicate(Predicate p1,
Predicate p2)
Constructs a new AndPredicate with 2 sub-predicates p1 and p2. |
Method Summary | |
AndPredicate |
add(Predicate p)
Adds another predicate that must pass for the overall test to return true. |
java.util.List |
getPredicates()
Returns both (or all) of the predicates being AND-ed together. |
boolean |
predicate(GameObject obj)
Returns true if both sub-predicates return true for the object. |
java.lang.String |
print()
Prints an English-like description of the predicate, e.g. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public AndPredicate(Predicate p1, Predicate p2)
Method Detail |
public java.util.List getPredicates()
public AndPredicate add(Predicate p)
p
- another Predicate that also must be true
public boolean predicate(GameObject obj)
predicate
in interface Predicate
obj
- the object to predicate upon
public java.lang.String toString()
public java.lang.String print()
PrintablePredicate
print
in interface PrintablePredicate
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |