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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.String
getVariable(java.lang.String key)
The string variable stored withkey
.java.lang.String
getVariable(java.lang.String key, java.lang.String defaultValue)
The string variable stored withkey
ordefaultValue
if the result would benull
.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.
-
-
-
Method Detail
-
getVariable
java.lang.String getVariable(java.lang.String key)
The string variable stored withkey
.- Parameters:
key
- The name of the string variable- Returns:
- The string variable stored with
key
.
-
getVariable
java.lang.String getVariable(java.lang.String key, java.lang.String defaultValue)
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
java.util.Iterator getVariableIterator()
An iterator over the entries (Map.Entry) of the Map.- Returns:
- An iterator over the entries (Map.Entry) of the Map.
-
getVariables
java.util.Map getVariables()
The map holding the assoications from names to values.- Returns:
- The map holding the assoications from names to values.
-
putVariable
void putVariable(java.lang.String key, java.lang.String value)
Enter a name/value binding in the map.- Parameters:
key
- The name of the string variablevalue
- The value to use for the variable.
-
-