Package | Description |
---|---|
data | |
process |
Modifier and Type | Class and Description |
---|---|
class |
Addition
The Addition operation, sub-class of
ArithmeticOperation . |
class |
ArithmeticOperation
This class represents all arithmetic operations including Addition,
Subtraction and Multiplication.
|
class |
Constant
This class represents the Constant tree node.
|
class |
Multiplication
The Multiplication operation, sub-class of
ArithmeticOperation . |
class |
Operand
This class is the abstraction of all leaf nodes that have no sub-tree.
|
class |
Subtraction
The Subtraction operation, sub-class of
ArithmeticOperation . |
class |
Variable
This class represents the Variable node.
|
Modifier and Type | Field and Description |
---|---|
private Tree |
ArithmeticOperation.leftOperand
Left operand of the operation (sub-tree)
|
private Tree |
ArithmeticOperation.rightOperand
Right operand of the operation (sub-tree)
|
Modifier and Type | Method and Description |
---|---|
Tree |
Tree.getLeftOperand() |
Tree |
Operand.getLeftOperand() |
Tree |
ArithmeticOperation.getLeftOperand() |
Tree |
Tree.getRightOperand() |
Tree |
Operand.getRightOperand() |
Tree |
ArithmeticOperation.getRightOperand() |
Modifier and Type | Method and Description |
---|---|
void |
ArithmeticOperation.setLeftOperand(Tree leftOperand) |
void |
ArithmeticOperation.setRightOperand(Tree rightOperand) |
Constructor and Description |
---|
Addition(Tree leftOperand,
Tree rightOperand) |
ArithmeticOperation(Tree leftOperand,
Tree rightOperand)
We need two operands (sub-trees) to construct an arithmetic operation.
|
Multiplication(Tree leftOperand,
Tree rightOperand) |
Subtraction(Tree leftOperand,
Tree rightOperand) |
Modifier and Type | Method and Description |
---|---|
Tree |
TreeBuilder.buildTree()
Implementation of tree construction algorithm.
|
Modifier and Type | Method and Description |
---|---|
static ArithmeticOperation |
TreeNodeFactory.createOperation(char type,
Tree leftOperand,
Tree rightOperand)
Create a concrete arithmetic operation.
|