Modifier and Type | Field and Description |
---|---|
private int |
value |
Constructor and Description |
---|
Constant(int value)
To create a Constant node, we need to specify the constant int value.
|
Modifier and Type | Method and Description |
---|---|
int |
calculate()
The calculation of the node is to simply return the constant value.
|
int |
getValue() |
java.lang.String |
toString() |
getLeftOperand, getRightOperand