|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object wyvern.lib.predicates.OrPredicate
This predicate combines N other predicates with an OR operation. It returns true if any of the sub-predicates returns true.
Constructor Summary | |
OrPredicate(Predicate p1,
Predicate p2)
Constructs a new OrPredicate |
Method Summary | |
OrPredicate |
add(Predicate p)
Adds another predicate to the chain. |
java.util.List |
getPredicates()
Returns both (or all) of the predicates being OR-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 OrPredicate(Predicate p1, Predicate p2)
Method Detail |
public OrPredicate add(Predicate p)
p
- another Predicate to to check
public java.util.List getPredicates()
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 |