public class MultiplicationExpressionNode extends SequenceExpressionNode
SequenceExpressionNode.TermtermsADDITION_NODE, CONSTANT_NODE, EXPONENTIATION_NODE, FUNCTION_NODE, MULTIPLICATION_NODE, VARIABLE_NODE| Constructor and Description |
|---|
MultiplicationExpressionNode()
Default constructor.
|
MultiplicationExpressionNode(ExpressionNode node,
boolean positive)
Constructor to create a multiplication with the first term already added.
|
| 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.MULTIPLICATION_NODE
|
double |
getValue()
Returns the value of the sub-expression that is rooted at this node.
|
addpublic MultiplicationExpressionNode()
public MultiplicationExpressionNode(ExpressionNode node, boolean positive)
node - the term to be addedpositive - a flag indicating whether the term is multiplied or dividedpublic int getType()
public double getValue()
public void accept(ExpressionNodeVisitor visitor)
visitor - the visitorCopyright © 2017. All rights reserved.