com.japisoft.formula.node
Class VariableNode

java.lang.Object
  extended bycom.japisoft.formula.node.AbstractNode
      extended bycom.japisoft.formula.node.VariableNode

public class VariableNode
extends AbstractNode

Node for Variable. This node shouldn't has children.

More information at : http://www.japisoft.com

Version:
1.0
Author:
(c) 2002-2003 JAPISOFT

Field Summary
 
Fields inherited from class com.japisoft.formula.node.AbstractNode
children, highPrecisionMode, op, roundingMode
 
Constructor Summary
VariableNode()
           
 
Method Summary
 void addChildNode(AbstractNode node)
          Add a new child
 java.lang.Object evaluate(NodeContext ctx)
           
 java.lang.String getVariableName()
           
 void setVariableName(java.lang.String variable)
          reset the variable name
 java.lang.String toString()
           
 
Methods inherited from class com.japisoft.formula.node.AbstractNode
dump, getChildAt, getChildCount, getColumn, getContent, getLine, getPos, isLeaf, setContent, setOp, setPos, setPos
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

VariableNode

public VariableNode()
Method Detail

getVariableName

public java.lang.String getVariableName()
Returns:
the current variable name

setVariableName

public void setVariableName(java.lang.String variable)
reset the variable name


addChildNode

public void addChildNode(AbstractNode node)
Description copied from class: AbstractNode
Add a new child

Overrides:
addChildNode in class AbstractNode

evaluate

public java.lang.Object evaluate(NodeContext ctx)
                          throws EvaluateException
Specified by:
evaluate in class AbstractNode
Throws:
EvaluateException

toString

public java.lang.String toString()