|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.nfunk.jep.SimpleNode org.nfunk.jep.ASTFunNode
public class ASTFunNode
Function Node
Field Summary |
---|
Fields inherited from class org.nfunk.jep.SimpleNode |
---|
children, id, parent, parser |
Constructor Summary | |
---|---|
ASTFunNode(int id)
Creates a new ASTFunNode |
|
ASTFunNode(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. |
boolean |
isOperator()
Returns true if node is an operator. |
java.lang.Object |
jjtAccept(ParserVisitor visitor,
java.lang.Object data)
Accept the visitor. |
void |
setFunction(java.lang.String name_in,
PostfixMathCommandI pfmc_in)
Sets the function for a node. |
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 org.nfunk.jep.SimpleNode |
---|
childrenAccept, dump, getId, jjtAddChild, jjtClose, jjtGetChild, jjtGetNumChildren, jjtGetParent, jjtOpen, jjtSetParent, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ASTFunNode(int id)
public ASTFunNode(Parser p, int id)
Method Detail |
---|
public java.lang.Object jjtAccept(ParserVisitor visitor, java.lang.Object data) throws ParseException
jjtAccept
in interface Node
jjtAccept
in class SimpleNode
ParseException
public void setFunction(java.lang.String name_in, PostfixMathCommandI pfmc_in)
public void setOperator(Operator op)
public java.lang.String toString()
toString
in class SimpleNode
public PostfixMathCommandI getPFMC()
public java.lang.String getName()
public Operator getOperator()
public boolean isOperator()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |