public class ExponentiationExpressionNode extends Object implements ExpressionNode
ADDITION_NODE, CONSTANT_NODE, EXPONENTIATION_NODE, FUNCTION_NODE, MULTIPLICATION_NODE, VARIABLE_NODE| Constructor and Description |
|---|
ExponentiationExpressionNode(ExpressionNode base,
ExpressionNode exponent)
Construct the ExponentiationExpressionNode with base and exponent
|
| Modifier and Type | Method and Description |
|---|---|
void |
accept(ExpressionNodeVisitor visitor)
Implementation of the visitor design pattern.
|
int |
getType()
Returns the type of the node, in this case ExpressionNode.EXPONENTIATION_NODE
|
double |
getValue()
Returns the value of the sub-expression that is rooted at this node.
|
public ExponentiationExpressionNode(ExpressionNode base, ExpressionNode exponent)
base - the node containing the baseexponent - the node containing the exponentpublic int getType()
getType in interface ExpressionNodepublic double getValue()
getValue in interface ExpressionNodepublic void accept(ExpressionNodeVisitor visitor)
accept in interface ExpressionNodevisitor - the visitorCopyright © 2017. All rights reserved.