wyvern.lib.predicates
Class NotEqualPredicate
java.lang.Object
wyvern.lib.predicates.ComparisonPredicate
wyvern.lib.predicates.NotEqualPredicate
- All Implemented Interfaces:
- Predicate, PrintablePredicate
- public class NotEqualPredicate
- extends ComparisonPredicate
Returns true if quantity A is != quantity B.
You can compare int properties of a GameObject with this
kind of predicate.
- Version:
- 1.0, Dec 26, 2003
- Author:
- Steve Yegge
Constructor Summary |
NotEqualPredicate(java.lang.String prop,
int value)
Constructs a new NotEqualPredicate |
Method Summary |
boolean |
predicate(GameObject obj)
Returns true if the object's int property specified
in the constructor of this Predicate is not
equal to the int value passed to the constructor. |
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 |
NotEqualPredicate
public NotEqualPredicate(java.lang.String prop,
int value)
- Constructs a new NotEqualPredicate
- Parameters:
prop
- the int property to checkvalue
- the value to compare the property against.
predicate
public boolean predicate(GameObject obj)
- Returns true if the object's int property specified
in the constructor of this Predicate is not
equal to the int value passed to the constructor.
- Parameters:
obj
-
- Returns:
- true if obj.getIntProperty(prop) != value
toString
public java.lang.String toString()
print
public java.lang.String print()
- Description copied from interface:
PrintablePredicate
- Prints an English-like description of the predicate, e.g.
"NOT name like 'bob'", or "quantity < 100 AND item is cursed"