com.singularsys.jep.parser
Class ASTOpNode

java.lang.Object
  extended by com.singularsys.jep.parser.SimpleNode
      extended by com.singularsys.jep.parser.ASTFunNode
          extended by com.singularsys.jep.parser.ASTOpNode
All Implemented Interfaces:
Node

public class ASTOpNode
extends ASTFunNode

Function Node


Field Summary
 
Fields inherited from class com.singularsys.jep.parser.SimpleNode
children, hooks, id, parent, parser
 
Constructor Summary
ASTOpNode(int id)
          Creates a new ASTFunNode
ASTOpNode(Parser p, int id)
          Creates a new ASTFunNode
 
Method Summary
 java.lang.String getName()
          Returns the name of the node (operator symbol or function name).
 Operator getOperator()
          Returns the id number of the operator if the node is an operator.
 PostfixMathCommandI getPFMC()
          Returns the math command class associated with this node.
 java.lang.Object jjtAccept(ParserVisitor visitor, java.lang.Object data)
          Accept the visitor.
 void setOperator(Operator op)
          Sets the opID, name and pfmc for this node by looking up the values in the Operators class
 java.lang.String toString()
          Returns a string containing the function name.
 
Methods inherited from class com.singularsys.jep.parser.ASTFunNode
setFunction
 
Methods inherited from class com.singularsys.jep.parser.SimpleNode
childrenAccept, dump, getHook, getId, hookKeys, jjtAddChild, jjtClose, jjtGetChild, jjtGetNumChildren, jjtGetParent, jjtOpen, jjtSetParent, setHook, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ASTOpNode

public ASTOpNode(int id)
Creates a new ASTFunNode


ASTOpNode

public ASTOpNode(Parser p,
                 int id)
Creates a new ASTFunNode

Method Detail

jjtAccept

public java.lang.Object jjtAccept(ParserVisitor visitor,
                                  java.lang.Object data)
                           throws EvaluationException
Accept the visitor.

Specified by:
jjtAccept in interface Node
Overrides:
jjtAccept in class ASTFunNode
Throws:
ParseException
EvaluationException

setOperator

public void setOperator(Operator op)
Sets the opID, name and pfmc for this node by looking up the values in the Operators class


toString

public java.lang.String toString()
Returns a string containing the function name.

Overrides:
toString in class ASTFunNode

getPFMC

public PostfixMathCommandI getPFMC()
Returns the math command class associated with this node.

Overrides:
getPFMC in class ASTFunNode

getName

public java.lang.String getName()
Returns the name of the node (operator symbol or function name).

Overrides:
getName in class ASTFunNode

getOperator

public Operator getOperator()
Returns the id number of the operator if the node is an operator.



Copyright © 2007 Singular Systems http://www.singularsys.com/jep