public final class ParameterMap<K,V>
extends java.lang.Object
implements java.util.Map<K,V>, java.io.Serializable
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.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(java.util.Map<K,V> map)
Construct a new map with the same mappings as the given map.
|
Modifier and Type | Method and Description |
---|---|
void |
clear() |
boolean |
containsKey(java.lang.Object key) |
boolean |
containsValue(java.lang.Object value) |
java.util.Set<java.util.Map.Entry<K,V>> |
entrySet()
Returns an unmodifiable
Set view of the mappings
contained in this map if it is locked. |
V |
get(java.lang.Object key) |
boolean |
isEmpty() |
boolean |
isLocked()
Return the locked state of this parameter map.
|
java.util.Set<K> |
keySet()
Returns an unmodifiable
Set view of the keys
contained in this map if it is locked. |
V |
put(K key,
V value) |
void |
putAll(java.util.Map<? extends K,? extends V> map) |
V |
remove(java.lang.Object key) |
void |
setLocked(boolean locked)
Set the locked state of this parameter map.
|
int |
size() |
java.util.Collection<V> |
values()
Returns an unmodifiable
Collection view of the
values contained in this map if it is locked. |
public 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()
public V remove(java.lang.Object key)
public boolean containsKey(java.lang.Object key)
public boolean containsValue(java.lang.Object value)
public java.util.Set<K> keySet()
Returns an unmodifiable Set
view of the keys
contained in this map if it is locked.
public java.util.Collection<V> values()
Returns an unmodifiable Collection
view of the
values contained in this map if it is locked.
Copyright © 2000-2018 Apache Software Foundation. All Rights Reserved.