| Modifier and Type | Class | Description |
|---|---|---|
class |
ExpressionTree |
The ExpressionTree class is a subclass of TreeNode and implements Expressions.
|
| Modifier and Type | Field | Description |
|---|---|---|
private TreeNode |
TreeNode.left |
|
private TreeNode |
TreeNode.right |
| Modifier and Type | Method | Description |
|---|---|---|
TreeNode |
Expressions.buildTree(java.lang.String[] exp) |
Builds a tree to represent the expression using a String[], where each item
of the array is an element in an expression.
|
TreeNode |
ExpressionTree.buildTree(java.lang.String[] exp) |
Builds a tree to represent the expression using a String[], where each item
of the array is an element in a postfix expression.
|
TreeNode |
TreeNode.getLeft() |
|
TreeNode |
TreeNode.getRight() |
| Modifier and Type | Method | Description |
|---|---|---|
void |
TreeNode.setLeft(TreeNode theNewLeft) |
|
void |
TreeNode.setRight(TreeNode theNewRight) |
| Constructor | Description |
|---|---|
ExpressionTree(java.lang.String initValue,
TreeNode initLeft,
TreeNode initRight) |
Constructs an ExpressionTree with a value, and using a left and right node,
by using the superclass's constructor.
|
ExpressionTree(TreeNode treeNode) |
Constructs an ExpressionTree by copying the values of the TreeNode
passed to it
|
TreeNode(java.lang.Object initValue,
TreeNode initLeft,
TreeNode initRight) |