com.japisoft.formula.node
Class AbstractNode

java.lang.Object
  |
  +--com.japisoft.formula.node.AbstractNode
Direct Known Subclasses:
BinaryOperatorNode, FunctionNode, GroupNode, ListNode, RootNode, TernaryOperatorNode, UnaryOperatorNode, ValueNode, VariableNode

public abstract class AbstractNode
extends java.lang.Object

Common node. Such node is a result of the parsing process, so this is not theorically mutable. However, you can access to all children and update the structure by inheriting from this node and change the children Vector content.

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

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

Constructor Summary
AbstractNode()
           
AbstractNode(int defroundingMode)
           
 
Method Summary
 void addChildNode(AbstractNode node)
          Add a new child
 void dump()
           
abstract  java.lang.Object evaluate(NodeContext ctx)
           
 AbstractNode getChildAt(int index)
           
 int getChildCount()
           
 java.lang.String getContent()
           
 int getPos()
           
 boolean isLeaf()
           
 void setContent(java.lang.String content)
          Set the node content like a function name, a variable name...
 void setOp(java.lang.String op)
           
 void setPos(int pos)
          Reset the current node location in the expression
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractNode

public AbstractNode()

AbstractNode

public AbstractNode(int defroundingMode)
Method Detail

setPos

public void setPos(int pos)
Reset the current node location in the expression


getPos

public int getPos()

setOp

public void setOp(java.lang.String op)

setContent

public void setContent(java.lang.String content)
Set the node content like a function name, a variable name...


getContent

public java.lang.String getContent()
Returns:
the node content like a function name, a variable name

addChildNode

public void addChildNode(AbstractNode node)
Add a new child


isLeaf

public boolean isLeaf()

getChildCount

public int getChildCount()

getChildAt

public AbstractNode getChildAt(int index)

dump

public void dump()

evaluate

public abstract java.lang.Object evaluate(NodeContext ctx)
                                   throws EvaluateException
EvaluateException