vmm.functions
Class Expression

java.lang.Object
  extended by vmm.functions.Function
      extended by vmm.functions.Expression

public class Expression
extends Function

Represents a real-valued expression. An expression can only be produced by a Parser. An expression is implemented as a Function that has no arguments (and no name).

See Also:
Parser.parseExpression(String)

Field Summary
 
Fields inherited from class vmm.functions.Function
func
 
Method Summary
 double value()
          Evaluate this expression (using an EvalStack that is unique to the current Thread).
 double value(EvalStack stack)
          Evaluate this expression using a stack provided as a parameter.
 
Methods inherited from class vmm.functions.Function
getArity, getName, setName, value, value
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

value

public double value()
Evaluate this expression (using an EvalStack that is unique to the current Thread).


value

public double value(EvalStack stack)
Evaluate this expression using a stack provided as a parameter.

Parameters:
stack - a non-null stack to be used for evaluating the expression.