Package de.intarsys.tools.variable
Class StandardVariableNamespace
java.lang.Object
de.intarsys.tools.variable.StandardVariableNamespace
- All Implemented Interfaces:
IVariableNamespace
A general implementation for an object providing
IVariableNamespace
.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetVariable
(String key) The string variable stored withkey
.getVariable
(String key, String defaultValue) The string variable stored withkey
ordefaultValue
if the result would benull
.An iterator over the entries (Map.Entry) of the Map.The map holding the assoications from names to values.void
putVariable
(String key, String value) Enter a name/value binding in the map.void
putVariables
(Map v)
-
Constructor Details
-
StandardVariableNamespace
public StandardVariableNamespace()Create a VariableScope
-
-
Method Details
-
getVariable
Description copied from interface:IVariableNamespace
The string variable stored withkey
.- Specified by:
getVariable
in interfaceIVariableNamespace
- Parameters:
key
- The name of the string variable- Returns:
- The string variable stored with
key
.
-
getVariable
Description copied from interface:IVariableNamespace
The string variable stored withkey
ordefaultValue
if the result would benull
.- Specified by:
getVariable
in interfaceIVariableNamespace
- Parameters:
key
- The name of the string variabledefaultValue
- The value to use if result would be null- Returns:
- The string variable stored with
key
ordefaultValue
if the result would benull
.
-
getVariableIterator
Description copied from interface:IVariableNamespace
An iterator over the entries (Map.Entry) of the Map.- Specified by:
getVariableIterator
in interfaceIVariableNamespace
- Returns:
- An iterator over the entries (Map.Entry) of the Map.
-
getVariables
Description copied from interface:IVariableNamespace
The map holding the assoications from names to values.- Specified by:
getVariables
in interfaceIVariableNamespace
- Returns:
- The map holding the assoications from names to values.
-
putVariable
Description copied from interface:IVariableNamespace
Enter a name/value binding in the map.- Specified by:
putVariable
in interfaceIVariableNamespace
- Parameters:
key
- The name of the string variablevalue
- The value to use for the variable.
-
putVariables
-