Package de.intarsys.tools.variable
Class StandardVariableNamespace
- java.lang.Object
-
- de.intarsys.tools.variable.StandardVariableNamespace
-
- All Implemented Interfaces:
IVariableNamespace
public class StandardVariableNamespace extends java.lang.Object implements IVariableNamespace
A general implementation for an object providingIVariableNamespace.
-
-
Constructor Summary
Constructors Constructor Description StandardVariableNamespace()Create a VariableScope
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetVariable(java.lang.String key)The string variable stored withkey.java.lang.StringgetVariable(java.lang.String key, java.lang.String defaultValue)The string variable stored withkeyordefaultValueif the result would benull.java.util.IteratorgetVariableIterator()An iterator over the entries (Map.Entry) of the Map.java.util.MapgetVariables()The map holding the assoications from names to values.voidputVariable(java.lang.String key, java.lang.String value)Enter a name/value binding in the map.voidputVariables(java.util.Map v)
-
-
-
Method Detail
-
getVariable
public java.lang.String getVariable(java.lang.String key)
Description copied from interface:IVariableNamespaceThe string variable stored withkey.- Specified by:
getVariablein interfaceIVariableNamespace- Parameters:
key- The name of the string variable- Returns:
- The string variable stored with
key.
-
getVariable
public java.lang.String getVariable(java.lang.String key, java.lang.String defaultValue)Description copied from interface:IVariableNamespaceThe string variable stored withkeyordefaultValueif the result would benull.- Specified by:
getVariablein interfaceIVariableNamespace- Parameters:
key- The name of the string variabledefaultValue- The value to use if result would be null- Returns:
- The string variable stored with
keyordefaultValueif the result would benull.
-
getVariableIterator
public java.util.Iterator getVariableIterator()
Description copied from interface:IVariableNamespaceAn iterator over the entries (Map.Entry) of the Map.- Specified by:
getVariableIteratorin interfaceIVariableNamespace- Returns:
- An iterator over the entries (Map.Entry) of the Map.
-
getVariables
public java.util.Map getVariables()
Description copied from interface:IVariableNamespaceThe map holding the assoications from names to values.- Specified by:
getVariablesin interfaceIVariableNamespace- Returns:
- The map holding the assoications from names to values.
-
putVariable
public void putVariable(java.lang.String key, java.lang.String value)Description copied from interface:IVariableNamespaceEnter a name/value binding in the map.- Specified by:
putVariablein interfaceIVariableNamespace- Parameters:
key- The name of the string variablevalue- The value to use for the variable.
-
putVariables
public void putVariables(java.util.Map v)
-
-