public final class ParameterMap extends LinkedHashMap<String,String[]>
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.AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>| Constructor and Description |
|---|
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(Map<String,String[]> map)
Construct a new map with the same mappings as the given map.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Remove all mappings from this map.
|
boolean |
isLocked()
Return the locked state of this parameter map.
|
String[] |
put(String key,
String[] value)
Associate the specified value with the specified key in this map.
|
void |
putAll(Map map)
Copy all of the mappings from the specified map to this one.
|
Object |
remove(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.
|
containsValue, entrySet, forEach, get, getOrDefault, keySet, removeEldestEntry, replaceAll, valuesclone, compute, computeIfAbsent, computeIfPresent, containsKey, isEmpty, merge, putIfAbsent, remove, remove, replace, replace, sizeequals, hashCode, toStringfinalize, getClass, notify, notifyAll, wait, wait, waitcompute, computeIfAbsent, computeIfPresent, containsKey, equals, hashCode, isEmpty, merge, putIfAbsent, remove, remove, replace, replace, sizepublic ParameterMap()
public ParameterMap(int initialCapacity)
initialCapacity - The initial capacity of this mappublic ParameterMap(int initialCapacity,
float loadFactor)
initialCapacity - The initial capacity of this maploadFactor - The load factor of this mappublic boolean isLocked()
public void setLocked(boolean locked)
locked - The new locked statepublic void clear()
clear in interface Map<String,String[]>clear in class LinkedHashMap<String,String[]>IllegalStateException - if this map is currently lockedpublic String[] put(String key, String[] value)
put in interface Map<String,String[]>put in class HashMap<String,String[]>key - Key with which the specified value is to be associatedvalue - Value to be associated with the specified keynull if there was no mapping for keyIllegalStateException - if this map is currently lockedpublic void putAll(Map map)
public Object remove(String key)
key - Key whose mapping is to be removed from the mapnull if there was no mapping for that
keyIllegalStateException - if this map is currently lockedCopyright © 2017–2021 Oracle Corporation. All rights reserved.