jsynoptic.parser
Class NodeForAddition

java.lang.Object
  extended by jsynoptic.parser.SimpleNode
      extended by jsynoptic.parser.ExpressionNode
          extended by jsynoptic.parser.NodeForAddition
All Implemented Interfaces:
java.lang.Cloneable, Node

public class NodeForAddition
extends ExpressionNode


Field Summary
 java.util.Vector operator
           
 
Fields inherited from class jsynoptic.parser.SimpleNode
children, id, parent, parser
 
Constructor Summary
NodeForAddition(ExpressionParser p, int id)
           
NodeForAddition(int id)
           
 
Method Summary
 java.lang.Object clone()
           
 java.lang.Number evaluate()
          Evaluate the subtree under this node and return the computation result as a number
 java.lang.String toString()
           
 
Methods inherited from class jsynoptic.parser.ExpressionNode
getVariables
 
Methods inherited from class jsynoptic.parser.SimpleNode
dump, jjtAddChild, jjtClose, jjtGetChild, jjtGetNumChildren, jjtGetParent, jjtOpen, jjtSetParent, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

operator

public java.util.Vector operator
Constructor Detail

NodeForAddition

public NodeForAddition(int id)

NodeForAddition

public NodeForAddition(ExpressionParser p,
                       int id)
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class SimpleNode

evaluate

public java.lang.Number evaluate()
Description copied from class: ExpressionNode
Evaluate the subtree under this node and return the computation result as a number

Specified by:
evaluate in class ExpressionNode

clone

public java.lang.Object clone()
Overrides:
clone in class ExpressionNode