|
sdr 0.21 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.cscott.sdr.calls.Predicate
public abstract class Predicate
A Predicate
is a boolean test on the current formation and dance
state, or else an operator on such boolean tests. For example, there
are simple predicates such as "PROGRAM AT LEAST(foo)" which takes as an
argument some dance program foo, as well as "and" and "or" predicates
which combine other predicate to yield a boolean result. The
Condition
object in the call tree represents the unevaluated
arguments of a Predicate
application.
Constructor Summary | |
---|---|
Predicate()
|
Method Summary | |
---|---|
boolean |
equals(Object o)
|
abstract boolean |
evaluate(DanceState ds,
Formation f,
Condition c)
Evaluates this predicate with the arguments given in the Condition node, returning a boolean. |
abstract String |
getName()
The name of this predicate, in our internal jargon. |
int |
hashCode()
|
static Predicate |
lookup(String s)
Lookup a Predicate in the PredicateList . |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Predicate()
Method Detail |
---|
public abstract String getName()
public abstract boolean evaluate(DanceState ds, Formation f, Condition c)
Condition
node, returning a boolean. Note that the
predicate
field of c
should
match @{link Predicate#getName(String) this.getName()}.
public final String toString()
toString
in class Object
public final int hashCode()
hashCode
in class Object
public final boolean equals(Object o)
equals
in class Object
public static Predicate lookup(String s)
Predicate
in the PredicateList
.
|
sdr 0.21 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |