public class SimpleVariableDeclarations extends 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(String name)
Adds a variable declaration for a boolean variable
|
void |
addDouble(String name)
Adds a variable declaration for a double variable
|
void |
addString(String name)
Adds a variable declaration for a string variable
|
SimpleVariableDeclarations.VariableInitializer |
getInitializer()
Returns an object to initialize the declared variables
|
Node |
getVariable(String name)
Tries to fetch a declared variable
|
boolean |
hasVariable(String name)
Whether the variable is declared
|
public boolean hasVariable(String name)
hasVariable in interface VariableDeclarationsname - name of the variable being queriedpublic Node getVariable(String name)
getVariable in interface VariableDeclarationsname - name of the variable to be fetchedpublic void addBoolean(String name)
name - the name of the variablepublic void addDouble(String name)
name - the name of the variablepublic void addString(String name)
name - the name of the variablepublic SimpleVariableDeclarations.VariableInitializer getInitializer()
Copyright © 2016 University of Waikato, Hamilton, NZ. All Rights Reserved.