intarsys runtime library

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
 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.
 

Method Detail

getVariable

String getVariable(String key)
The string variable stored with key.

Parameters:
key - The name of the string variable
Returns:
The string variable stored with key.

getVariable

String getVariable(String key,
                   String defaultValue)
The string variable stored with key or defaultValue if the result would be null.

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

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

void putVariable(String key,
                 String value)
Enter a name/value binding in the map.

Parameters:
key - The name of the string variable
value - The value to use for the variable.

intarsys runtime library

Copyright © 2008 intarsys consulting GmbH. All Rights Reserved.