|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectslogo.language.GrammarElement
slogo.expression.Expression
public abstract class Expression
The base class of all arithmetic expressions, the evaluate
method uses the hook/template method value
to return a Double
value, the template method returns a double.
Field Summary |
---|
Fields inherited from class slogo.language.GrammarElement |
---|
gelementsToValue |
Constructor Summary | |
---|---|
Expression()
|
Method Summary | |
---|---|
java.lang.Double |
evaluate(Context c)
Evaluate this language construct in some context. |
abstract double |
value(Context c)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Expression()
Method Detail |
---|
public java.lang.Double evaluate(Context c)
GrammarElement
evaluate
in class GrammarElement
c
- context in which the evaluation takes place
public abstract double value(Context c)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |