gnu.beanfactory
Interface ScopeDictionary
- public interface ScopeDictionary
Simple dictionary-style adapter interface for various key-value
mapping classes (Hashtable, Request, Session, Application).
- Version:
- $Id: ScopeDictionary.java,v 1.12 2001/10/04 17:35:29 rschoening Exp $
- Author:
- Rob Schoening <rob@beanfactory.net>
|
Method Summary |
java.lang.Object |
get(java.lang.String key)
Retrieves a value from the namespace by string key. |
void |
put(java.lang.String key,
java.lang.Object val)
Maps an object onto a string in the current namespace. |
void |
remove(java.lang.String key)
Removes a key-value mapping from the namespace if one exists. |
get
public java.lang.Object get(java.lang.String key)
- Retrieves a value from the namespace by string key.
- Parameters:
key - The string key- Returns:
- The object mapped to the key, or null if there is no mapping
put
public void put(java.lang.String key,
java.lang.Object val)
- Maps an object onto a string in the current namespace.
Please note that put(key,null) is equivalent to remove(key).
- Parameters:
key - The string keyval - The object to be mapped
remove
public void remove(java.lang.String key)
- Removes a key-value mapping from the namespace if one exists.
- Parameters:
key - The key to remove