public class StandardVariableNamespace extends java.lang.Object implements IVariableNamespace
IVariableNamespace
.Constructor and Description |
---|
StandardVariableNamespace()
Create a VariableScope
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getVariable(java.lang.String key)
The string variable stored with
key . |
java.lang.String |
getVariable(java.lang.String key,
java.lang.String defaultValue)
The string variable stored with
key or
defaultValue if the result would be null . |
java.util.Iterator |
getVariableIterator()
An iterator over the entries (Map.Entry) of the Map.
|
java.util.Map |
getVariables()
The map holding the assoications from names to values.
|
void |
putVariable(java.lang.String key,
java.lang.String value)
Enter a name/value binding in the map.
|
void |
putVariables(java.util.Map v) |
public StandardVariableNamespace()
public java.lang.String getVariable(java.lang.String key)
IVariableNamespace
key
.getVariable
in interface IVariableNamespace
key
- The name of the string variablekey
.public java.lang.String getVariable(java.lang.String key, java.lang.String defaultValue)
IVariableNamespace
key
or
defaultValue
if the result would be null
.getVariable
in interface IVariableNamespace
key
- The name of the string variabledefaultValue
- The value to use if result would be nullkey
or
defaultValue
if the result would be
null
.public java.util.Iterator getVariableIterator()
IVariableNamespace
getVariableIterator
in interface IVariableNamespace
public java.util.Map getVariables()
IVariableNamespace
getVariables
in interface IVariableNamespace
public void putVariable(java.lang.String key, java.lang.String value)
IVariableNamespace
putVariable
in interface IVariableNamespace
key
- The name of the string variablevalue
- The value to use for the variable.public void putVariables(java.util.Map v)