Package de.intarsys.tools.variable
Interface IVariableNamespace
- All Known Implementing Classes:
StandardVariableNamespace
public interface IVariableNamespace
This defines the ability of a component to support generic key/value mappings
from string to string.
Variables are used most often for string replacements. You should not use this feature for parameter or attribute passing between components.
-
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.
-
Method Details
-
getVariable
The string variable stored withkey
.- Parameters:
key
- The name of the string variable- Returns:
- The string variable stored with
key
.
-
getVariable
The string variable stored withkey
ordefaultValue
if the result would benull
.- 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
Iterator getVariableIterator()An iterator over the entries (Map.Entry) of the Map.- Returns:
- An iterator over the entries (Map.Entry) of the Map.
-
getVariables
Map getVariables()The map holding the assoications from names to values.- Returns:
- The map holding the assoications from names to values.
-
putVariable
Enter a name/value binding in the map.- Parameters:
key
- The name of the string variablevalue
- The value to use for the variable.
-