|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object wyvern.lib.predicates.UserTypePredicate
A predicate that checks whether an object is of a certain "user type", which is basically any boolean property on the object. In practice, we only look for certain types, such as "wand", "sword", "coins", and so on.
Constructor Summary | |
UserTypePredicate(java.lang.String type)
Constructs a new UserTypePredicate for the specified type. |
Method Summary | |
java.lang.String |
getType()
|
boolean |
predicate(GameObject obj)
Checks an object to see if it passes the predicate. |
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 UserTypePredicate(java.lang.String type)
Method Detail |
public java.lang.String getType()
public boolean predicate(GameObject obj)
Predicate
predicate
in interface Predicate
obj
- any GameObject
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 |