org.apache.catalina.util
public final class: ParameterMap [javadoc |
source]
java.lang.Object
java.util.AbstractMap
java.util.HashMap
org.apache.catalina.util.ParameterMap
All Implemented Interfaces:
Map, Serializable, Cloneable
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 (Tue, 24 Oct 2006) $
Methods from java.util.HashMap: |
---|
addEntry, capacity, clear, clone, containsKey, containsValue, createEntry, entrySet, get, getEntry, hash, indexFor, init, isEmpty, keySet, loadFactor, newEntryIterator, newKeyIterator, newValueIterator, put, putAll, remove, removeEntryForKey, removeMapping, resize, size, transfer, values |
Methods from java.util.AbstractMap: |
---|
access$000, clear, clone, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, toString, values |
Methods from java.lang.Object: |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method from org.apache.catalina.util.ParameterMap Detail: |
public void clear() {
if (locked)
throw new IllegalStateException
(sm.getString("parameterMap.locked"));
super.clear();
}
Remove all mappings from this map. |
public boolean isLocked() {
return (this.locked);
}
Return the locked state of this parameter map. |
public Object put(Object key,
Object value) {
if (locked)
throw new IllegalStateException
(sm.getString("parameterMap.locked"));
return (super.put(key, value));
}
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. |
public void putAll(Map map) {
if (locked)
throw new IllegalStateException
(sm.getString("parameterMap.locked"));
super.putAll(map);
}
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. |
public Object remove(Object key) {
if (locked)
throw new IllegalStateException
(sm.getString("parameterMap.locked"));
return (super.remove(key));
}
Remove the mapping for this key from the map if present. |
public void setLocked(boolean locked) {
this.locked = locked;
}
Set the locked state of this parameter map. |