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:
- java.io.Serializable,- java.util.Map<K,V>
 
 public final class ParameterMap<K,V> extends java.lang.Object implements java.util.Map<K,V>, java.io.SerializableImplementation of java.util.Map that includes alockedproperty. 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, aParameterMapinstance is not locked.- Author:
- Craig R. McClanahan
- See Also:
- Serialized Form
 
- 
- 
Constructor SummaryConstructors Constructor 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(java.util.Map<K,V> map)Construct a new map with the same mappings as the given map.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()booleancontainsKey(java.lang.Object key)booleancontainsValue(java.lang.Object value)java.util.Set<java.util.Map.Entry<K,V>>entrySet()Vget(java.lang.Object key)booleanisEmpty()booleanisLocked()java.util.Set<K>keySet()Vput(K key, V value)voidputAll(java.util.Map<? extends K,? extends V> map)Vremove(java.lang.Object key)voidsetLocked(boolean locked)Set the locked state of this parameter map.intsize()java.util.Collection<V>values()
 
- 
- 
- 
Constructor Detail- 
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
 
 
- 
 - 
Method Detail- 
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() 
 - 
removepublic V remove(java.lang.Object key) 
 - 
containsKeypublic boolean containsKey(java.lang.Object key) 
 - 
containsValuepublic boolean containsValue(java.lang.Object value) 
 - 
keySetpublic java.util.Set<K> keySet() Returns an unmodifiable Setview of the keys contained in this map if it is locked.
 - 
valuespublic java.util.Collection<V> values() Returns an unmodifiable Collectionview of the values contained in this map if it is locked.
 
- 
 
-