com.graphbuilder.math
Class OpNode
java.lang.Object
com.graphbuilder.math.Expression
com.graphbuilder.math.OpNode
- Direct Known Subclasses:
- AddNode, DivNode, MultNode, PowNode, SubNode
- public abstract class OpNode
- extends Expression
A node of an expression tree that has exactly 2 children, a left child and a right child. After the
children are evaluated, a mathematical operation is applied and the result is returned.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
leftChild
protected Expression leftChild
rightChild
protected Expression rightChild
OpNode
public OpNode(Expression leftChild,
Expression rightChild)
setLeftChild
public void setLeftChild(Expression x)
setRightChild
public void setRightChild(Expression x)
getLeftChild
public Expression getLeftChild()
getRightChild
public Expression getRightChild()
getSymbol
public abstract java.lang.String getSymbol()
- Returns the text symbol that represents the operation.