intarsys runtime library

de.intarsys.tools.variable
Class StandardVariableNamespace

java.lang.Object
  extended by de.intarsys.tools.variable.StandardVariableNamespace
All Implemented Interfaces:
IVariableNamespace

public class StandardVariableNamespace
extends Object
implements IVariableNamespace

A general implementation for an object providing IVariableNamespace.


Constructor Summary
StandardVariableNamespace()
          Create a VariableScope
 
Method Summary
 String getVariable(String key)
          The string variable stored with key.
 String getVariable(String key, String defaultValue)
          The string variable stored with key or defaultValue if the result would be null.
 Iterator getVariableIterator()
          An iterator over the entries (Map.Entry) of the Map.
 Map getVariables()
          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)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StandardVariableNamespace

public StandardVariableNamespace()
Create a VariableScope

Method Detail

getVariable

public String getVariable(String key)
Description copied from interface: IVariableNamespace
The string variable stored with key.

Specified by:
getVariable in interface IVariableNamespace
Parameters:
key - The name of the string variable
Returns:
The string variable stored with key.

getVariable

public String getVariable(String key,
                          String defaultValue)
Description copied from interface: IVariableNamespace
The string variable stored with key or defaultValue if the result would be null.

Specified by:
getVariable in interface IVariableNamespace
Parameters:
key - The name of the string variable
defaultValue - The value to use if result would be null
Returns:
The string variable stored with key or defaultValue if the result would be null.

getVariableIterator

public Iterator getVariableIterator()
Description copied from interface: IVariableNamespace
An iterator over the entries (Map.Entry) of the Map.

Specified by:
getVariableIterator in interface IVariableNamespace
Returns:
An iterator over the entries (Map.Entry) of the Map.

getVariables

public Map getVariables()
Description copied from interface: IVariableNamespace
The map holding the assoications from names to values.

Specified by:
getVariables in interface IVariableNamespace
Returns:
The map holding the assoications from names to values.

putVariable

public void putVariable(String key,
                        String value)
Description copied from interface: IVariableNamespace
Enter a name/value binding in the map.

Specified by:
putVariable in interface IVariableNamespace
Parameters:
key - The name of the string variable
value - The value to use for the variable.

putVariables

public void putVariables(Map v)

intarsys runtime library

Copyright © 2008 intarsys consulting GmbH. All Rights Reserved.