public class SimpleVariableDeclarations extends java.lang.Object implements VariableDeclarations
Modifier and Type | Class and Description |
---|---|
static class |
SimpleVariableDeclarations.VariableInitializer
A class to initialize variables that have been declared by a
SimpleVariableDeclarations class and used inside a program |
Constructor and Description |
---|
SimpleVariableDeclarations() |
Modifier and Type | Method and Description |
---|---|
void |
addBoolean(java.lang.String name)
Adds a variable declaration for a boolean variable
|
void |
addDouble(java.lang.String name)
Adds a variable declaration for a double variable
|
void |
addString(java.lang.String name)
Adds a variable declaration for a string variable
|
SimpleVariableDeclarations.VariableInitializer |
getInitializer()
Returns an object to initialize the declared variables
|
Node |
getVariable(java.lang.String name)
Tries to fetch a declared variable
|
boolean |
hasVariable(java.lang.String name)
Whether the variable is declared
|
public boolean hasVariable(java.lang.String name)
hasVariable
in interface VariableDeclarations
name
- name of the variable being queriedpublic Node getVariable(java.lang.String name)
getVariable
in interface VariableDeclarations
name
- name of the variable to be fetchedpublic void addBoolean(java.lang.String name)
name
- the name of the variablepublic void addDouble(java.lang.String name)
name
- the name of the variablepublic void addString(java.lang.String name)
name
- the name of the variablepublic SimpleVariableDeclarations.VariableInitializer getInitializer()