| java.util.HashMap org.apache.catalina.util.ParameterMap
ParameterMap | final public class ParameterMap extends HashMap (Code) | | Extended implementation of HashMap that includes a
locked property. This class can be used to safely expose
Catalina internal parameter map objects to user classes without having
to clone them in order to avoid modifications. When first created, a
ParmaeterMap instance is not locked.
author: Craig R. McClanahan version: $Revision: 467222 $ $Date: 2006-10-24 05:17:11 +0200 (mar., 24 oct. 2006) $ |
Constructor Summary | |
public | ParameterMap() Construct a new, empty map with the default initial capacity and
load factor. | public | ParameterMap(int initialCapacity) Construct a new, empty map with the specified initial capacity and
default load factor. | public | ParameterMap(int initialCapacity, float loadFactor) Construct a new, empty map with the specified initial capacity and
load factor. | public | ParameterMap(Map map) Construct a new map with the same mappings as the given map. |
Method Summary | |
public void | clear() Remove all mappings from this map. | public boolean | isLocked() Return the locked state of this parameter map. | public Object | put(Object key, Object value) Associate the specified value with the specified key in this map. | public void | putAll(Map map) Copy all of the mappings from the specified map to this one. | public Object | remove(Object key) Remove the mapping for this key from the map if present. | public void | setLocked(boolean locked) Set the locked state of this parameter map. |
ParameterMap | public ParameterMap()(Code) | | Construct a new, empty map with the default initial capacity and
load factor.
|
ParameterMap | public ParameterMap(int initialCapacity)(Code) | | Construct a new, empty map with the specified initial capacity and
default load factor.
Parameters: initialCapacity - The initial capacity of this map |
ParameterMap | public ParameterMap(int initialCapacity, float loadFactor)(Code) | | Construct a new, empty map with the specified initial capacity and
load factor.
Parameters: initialCapacity - The initial capacity of this map Parameters: loadFactor - The load factor of this map |
ParameterMap | public ParameterMap(Map map)(Code) | | Construct a new map with the same mappings as the given map.
Parameters: map - Map whose contents are dupliated in the new map |
isLocked | public boolean isLocked()(Code) | | Return the locked state of this parameter map.
|
put | public Object put(Object key, Object value)(Code) | | Associate the specified value with the specified key in this map. If
the map previously contained a mapping for this key, the old value is
replaced.
Parameters: key - Key with which the specified value is to be associated Parameters: value - Value to be associated with the specified key The previous value associated with the specified key, ornull if there was no mapping for key exception: IllegalStateException - if this map is currently locked |
putAll | public void putAll(Map map)(Code) | | Copy all of the mappings from the specified map to this one. These
mappings replace any mappings that this map had for any of the keys
currently in the specified Map.
Parameters: map - Mappings to be stored into this map exception: IllegalStateException - if this map is currently locked |
remove | public Object remove(Object key)(Code) | | Remove the mapping for this key from the map if present.
Parameters: key - Key whose mapping is to be removed from the map The previous value associated with the specified key, ornull if there was no mapping for that key exception: IllegalStateException - if this map is currently locked |
setLocked | public void setLocked(boolean locked)(Code) | | Set the locked state of this parameter map.
Parameters: locked - The new locked state |
|
|