public abstract class ArithmeticOperation extends java.lang.Object implements Tree
Modifier and Type | Field and Description |
---|---|
private Tree |
leftOperand
Left operand of the operation (sub-tree)
|
private Tree |
rightOperand
Right operand of the operation (sub-tree)
|
Constructor and Description |
---|
ArithmeticOperation(Tree leftOperand,
Tree rightOperand)
We need two operands (sub-trees) to construct an arithmetic operation.
|
Modifier and Type | Method and Description |
---|---|
Tree |
getLeftOperand() |
Tree |
getRightOperand() |
void |
setLeftOperand(Tree leftOperand) |
void |
setRightOperand(Tree rightOperand) |
private Tree leftOperand
private Tree rightOperand
public ArithmeticOperation(Tree leftOperand, Tree rightOperand)
leftOperand
- left sub-treerightOperand
- right sub-treepublic Tree getLeftOperand()
getLeftOperand
in interface Tree
public Tree getRightOperand()
getRightOperand
in interface Tree
public void setRightOperand(Tree rightOperand)
public void setLeftOperand(Tree leftOperand)