public class Variable extends Operand
VariableRepository
Operand
,
VariableRepository
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
name |
Constructor and Description |
---|
Variable(java.lang.String name)
To create a Variable node, we need to specify the variable name (unique).
|
Modifier and Type | Method and Description |
---|---|
<T> T |
accept(TreeVisitor<T> visitor)
A tree node can accept the visit of any
TreeVisitor . |
java.lang.String |
getName() |
java.lang.String |
toString() |
getLeftOperand, getRightOperand
public Variable(java.lang.String name)
name
- the name of the variable, unique valuepublic java.lang.String getName()
public java.lang.String toString()
toString
in class java.lang.Object
public <T> T accept(TreeVisitor<T> visitor)
Tree
TreeVisitor
.visitor
- the tree visitor of generic type