Package com.singularsys.jep.parser
Class ASTConstant
java.lang.Object
com.singularsys.jep.parser.SimpleNode
com.singularsys.jep.parser.ASTConstant
- All Implemented Interfaces:
Node
A Constant Node.
Has an associated value.
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.singularsys.jep.parser.Node
Node.HookKey -
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetName()Return the name associated with the node (if any).Return the operator associated with a Node (if any)getPFMC()Return the pfmc of a node (if any)getValue()Return the value associated with the node (if any).getVar()Return the variable associated with a Node (if any)jjtAccept(ParserVisitor visitor, Object data) Accept the visitor.voidtoString()Methods inherited from class com.singularsys.jep.parser.SimpleNode
childIterator, children, childrenAccept, dump, getHook, getId, hookKeys, jjtAddChild, jjtClose, jjtGetChild, jjtGetNumChildren, jjtGetParent, jjtOpen, jjtSetParent, removeHook, setHook, toString
-
Constructor Details
-
ASTConstant
public ASTConstant(int id)
-
-
Method Details
-
setValue
-
getValue
Description copied from interface:NodeReturn the value associated with the node (if any).- Returns:
- the value if an ASTConstant, ASTVarNode, null otherwise
-
jjtAccept
Accept the visitor.- Specified by:
jjtAcceptin interfaceNode- Overrides:
jjtAcceptin classSimpleNode- Throws:
JepException
-
toString
-
getName
Description copied from interface:NodeReturn the name associated with the node (if any).- Returns:
- the name if an ASTVarNode, ASTFunNode, ASTOpNode, null otherwise
-
getOperator
Description copied from interface:NodeReturn the operator associated with a Node (if any)- Returns:
- The Operator for ASTOpNodes, null otherwise
-
getPFMC
Description copied from interface:NodeReturn the pfmc of a node (if any)- Returns:
- the PostfixMathCommand for ASTFunNode and ASTOpNode, null otherwise
-
getVar
Description copied from interface:NodeReturn the variable associated with a Node (if any)- Returns:
- The Variable for ASTVarNodes, null otherwise
-