Package org.apache.catalina.util
Class ParameterMap<K,V> 
java.lang.Object
org.apache.catalina.util.ParameterMap<K,V> 
- Type Parameters:
- K- The type of Key
- V- The type of Value
- All Implemented Interfaces:
- Serializable,- Map<K,- V> 
Implementation of java.util.Map 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.- Author:
- Craig R. McClanahan
- See Also:
- 
Nested Class Summary
- 
Constructor SummaryConstructorsConstructorDescriptionConstruct 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<K, V> map) Construct a new map with the same mappings as the given map.
- 
Method SummaryMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Mapcompute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll
- 
Constructor Details- 
ParameterMappublic ParameterMap()Construct a new, empty map with the default initial capacity and load factor.
- 
ParameterMappublic ParameterMap(int initialCapacity) Construct a new, empty map with the specified initial capacity and default load factor.- Parameters:
- initialCapacity- The initial capacity of this map
 
- 
ParameterMappublic ParameterMap(int initialCapacity, float loadFactor) Construct a new, empty map with the specified initial capacity and load factor.- Parameters:
- initialCapacity- The initial capacity of this map
- loadFactor- The load factor of this map
 
- 
ParameterMapConstruct a new map with the same mappings as the given map.- Parameters:
- map- Map whose contents are duplicated in the new map
 
 
- 
- 
Method Details- 
isLockedpublic boolean isLocked()- Returns:
- the locked state of this parameter map.
 
- 
setLockedpublic void setLocked(boolean locked) Set the locked state of this parameter map.- Parameters:
- locked- The new locked state
 
- 
clearpublic void clear()- Specified by:
- clearin interface- Map<K,- V> 
- Throws:
- IllegalStateException- if this map is currently locked
 
- 
put- Specified by:
- putin interface- Map<K,- V> 
- Throws:
- IllegalStateException- if this map is currently locked
 
- 
putAll- Specified by:
- putAllin interface- Map<K,- V> 
- Throws:
- IllegalStateException- if this map is currently locked
 
- 
remove- Specified by:
- removein interface- Map<K,- V> 
- Throws:
- IllegalStateException- if this map is currently locked
 
- 
sizepublic int size()
- 
isEmptypublic boolean isEmpty()
- 
containsKey- Specified by:
- containsKeyin interface- Map<K,- V> 
 
- 
containsValue- Specified by:
- containsValuein interface- Map<K,- V> 
 
- 
get
- 
keySetReturns an unmodifiable Setview of the keys contained in this map if it is locked.
- 
valuesReturns an unmodifiable Collectionview of the values contained in this map if it is locked.
- 
entrySetReturns an unmodifiable Setview of the mappings contained in this map if it is locked.
 
-