|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.AbstractMap<K,V>
java.util.HashMap<K,V>
java.util.LinkedHashMap<java.lang.String,java.lang.String[]>
org.glassfish.grizzly.http.server.util.ParameterMap
public final class ParameterMap
Extended implementation of LinkedHashMap 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
ParameterMap instance is not locked.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.util.AbstractMap |
|---|
java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V> |
| Constructor Summary | |
|---|---|
ParameterMap()
Construct a new, empty map with the default initial capacity and load factor. |
|
ParameterMap(int initialCapacity)
Construct a new, empty map with the specified initial capacity and default load factor. |
|
ParameterMap(int initialCapacity,
float loadFactor)
Construct a new, empty map with the specified initial capacity and load factor. |
|
ParameterMap(java.util.Map<java.lang.String,java.lang.String[]> map)
Construct a new map with the same mappings as the given map. |
|
| Method Summary | |
|---|---|
void |
clear()
Remove all mappings from this map. |
boolean |
isLocked()
Return the locked state of this parameter map. |
java.lang.String[] |
put(java.lang.String key,
java.lang.String[] value)
Associate the specified value with the specified key in this map. |
void |
putAll(java.util.Map map)
Copy all of the mappings from the specified map to this one. |
java.lang.Object |
remove(java.lang.String key)
Remove the mapping for this key from the map if present. |
void |
setLocked(boolean locked)
Set the locked state of this parameter map. |
| Methods inherited from class java.util.LinkedHashMap |
|---|
containsValue, get, removeEldestEntry |
| Methods inherited from class java.util.HashMap |
|---|
clone, containsKey, entrySet, isEmpty, keySet, remove, size, values |
| Methods inherited from class java.util.AbstractMap |
|---|
equals, hashCode, toString |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.Map |
|---|
containsKey, entrySet, equals, hashCode, isEmpty, keySet, remove, size, values |
| Constructor Detail |
|---|
public ParameterMap()
public ParameterMap(int initialCapacity)
initialCapacity - The initial capacity of this map
public ParameterMap(int initialCapacity,
float loadFactor)
initialCapacity - The initial capacity of this maploadFactor - The load factor of this mappublic ParameterMap(java.util.Map<java.lang.String,java.lang.String[]> map)
map - Map whose contents are duplicated in the new map| Method Detail |
|---|
public boolean isLocked()
public void setLocked(boolean locked)
locked - The new locked statepublic void clear()
clear in interface java.util.Map<java.lang.String,java.lang.String[]>clear in class java.util.LinkedHashMap<java.lang.String,java.lang.String[]>java.lang.IllegalStateException - if this map is currently locked
public java.lang.String[] put(java.lang.String key,
java.lang.String[] value)
put in interface java.util.Map<java.lang.String,java.lang.String[]>put in class java.util.HashMap<java.lang.String,java.lang.String[]>key - Key with which the specified value is to be associatedvalue - Value to be associated with the specified key
null if there was no mapping for key
java.lang.IllegalStateException - if this map is currently lockedpublic void putAll(java.util.Map map)
putAll in interface java.util.Map<java.lang.String,java.lang.String[]>putAll in class java.util.HashMap<java.lang.String,java.lang.String[]>map - Mappings to be stored into this map
java.lang.IllegalStateException - if this map is currently lockedpublic java.lang.Object remove(java.lang.String key)
key - Key whose mapping is to be removed from the map
null if there was no mapping for that key
java.lang.IllegalStateException - if this map is currently locked
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||