|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjmathlib.core.interpreter.VariableList
public class VariableList
Class used to store all the declared variables within a context
| Constructor Summary | |
|---|---|
VariableList()
Sets up the ArrayList of variables |
|
VariableList(VariableList _variables)
Create a duplicate of a VariableList |
|
| Method Summary | |
|---|---|
void |
clear()
remove all variables from the list |
java.lang.Object |
clone()
Create a duplicate of this Variable List |
Variable |
createVariable(java.lang.String name)
creates a variable, if it doesn't already exist. |
java.util.Iterator |
getIterator()
|
int |
getSize()
|
Variable |
getVariable(java.lang.String name)
|
boolean |
isVariable(java.lang.String name)
Check wether or not a variable with the given name exists. |
void |
listVariables()
Lists all the currently declared variables to the console and a log file |
void |
loadVariables(java.lang.String fileName)
loads the list of variables |
void |
remove(java.lang.String name)
Remove a variable from the list |
void |
saveVariables(java.lang.String fileName)
saves the list of variables |
void |
setVariable(java.lang.String name,
OperandToken value)
|
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public VariableList()
public VariableList(VariableList _variables)
parent - = the previous variable context| Method Detail |
|---|
public java.util.Iterator getIterator()
public int getSize()
public void remove(java.lang.String name)
variable-string - = the variable to removepublic void clear()
public void setVariable(java.lang.String name,
OperandToken value)
name - = the name of the variablevalue - = the value to set it topublic Variable getVariable(java.lang.String name)
name - = the name of the variable
public boolean isVariable(java.lang.String name)
name - = the name of a variablepublic void listVariables()
public Variable createVariable(java.lang.String name)
name - = the name of the variable to create
public void saveVariables(java.lang.String fileName)
fileName - = the name of the file to save topublic void loadVariables(java.lang.String fileName)
fileName - = the name of the file to load frompublic java.lang.Object clone()
clone in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||