public class TreeBuilder
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
formula |
private VariableRepository |
variableRepository |
Constructor and Description |
---|
TreeBuilder(java.lang.String fileName)
The constructor ensures the preparation work for tree building.
|
Modifier and Type | Method and Description |
---|---|
Tree |
buildTree()
Implementation of tree construction algorithm.
|
private boolean |
isArithmeticOperation(java.lang.String value) |
private boolean |
isConstant(java.lang.String value) |
private boolean |
isVariable(java.lang.String value) |
private java.lang.String formula
private VariableRepository variableRepository
public TreeBuilder(java.lang.String fileName)
fileName
- the name of the input file that contains tree informationpublic Tree buildTree()
private boolean isConstant(java.lang.String value)
private boolean isArithmeticOperation(java.lang.String value)
private boolean isVariable(java.lang.String value)