|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.singularsys.jep.VariableTable
public class VariableTable
Field Summary | |
---|---|
protected Jep |
jep
|
protected java.util.Map<java.lang.String,Variable> |
table
|
Constructor Summary | |
---|---|
VariableTable()
|
Method Summary | |
---|---|
Variable |
addVariable(java.lang.String name)
Adds a new variable with no value specified. |
Variable |
addVariable(java.lang.String name,
java.lang.Object value)
Adds a new variable with specified value. |
Variable |
addVariable(java.lang.String name,
java.lang.Object value,
VariableFactory varFac)
Adds a new variable with specified value. |
void |
clear()
Clears all variables from the table. |
Variable |
getVariable(java.lang.String name)
Gets an existing variable, returns null if variable is not found. |
void |
init(Jep j)
Initialize the component. |
boolean |
isEmpty()
|
java.util.Set<java.lang.String> |
keySet()
|
int |
size()
|
java.lang.String |
toString()
|
java.util.Collection<Variable> |
values()
A collection of all the variables |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected java.util.Map<java.lang.String,Variable> table
protected transient Jep jep
Constructor Detail |
---|
public VariableTable()
Method Detail |
---|
public void init(Jep j)
JepComponent
init
in interface JepComponent
j
- the current Jep instancepublic Variable addVariable(java.lang.String name)
Variable
instance is created with the variable factory.
name
- the variable's name
public Variable addVariable(java.lang.String name, java.lang.Object value)
name
- the name of the variablevalue
- the value for the variable to be set to
public Variable addVariable(java.lang.String name, java.lang.Object value, VariableFactory varFac)
name
- the name of the variablevalue
- the value for the variable to be set tovarFac
- the variable factory to use if a variable needs to be created
public Variable getVariable(java.lang.String name)
name
-
public void clear()
public boolean isEmpty()
public java.util.Set<java.lang.String> keySet()
public int size()
public java.util.Collection<Variable> values()
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |