K - The type of KeyV - The type of Valuepublic final class ParameterMap<K,V> extends Object implements Map<K,V>, 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(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(Object key) |
boolean |
containsValue(Object value) |
Set<Map.Entry<K,V>> |
entrySet()
Returns an unmodifiable
Set view of the mappings
contained in this map if it is locked. |
V |
get(Object key) |
boolean |
isEmpty() |
boolean |
isLocked() |
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(Map<? extends K,? extends V> map) |
V |
remove(Object key) |
void |
setLocked(boolean locked)
Set the locked state of this parameter map.
|
int |
size() |
Collection<V> |
values()
Returns an unmodifiable
Collection view of the
values contained in this map if it is locked. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcompute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAllpublic 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<K,V>IllegalStateException - if this map is currently lockedpublic V put(K key, V value)
put in interface Map<K,V>IllegalStateException - if this map is currently lockedpublic void putAll(Map<? extends K,? extends V> map)
putAll in interface Map<K,V>IllegalStateException - if this map is currently lockedpublic V remove(Object key)
remove in interface Map<K,V>IllegalStateException - if this map is currently lockedpublic boolean containsKey(Object key)
containsKey in interface Map<K,V>public boolean containsValue(Object value)
containsValue in interface Map<K,V>public Set<K> keySet()
Returns an unmodifiable Set view of the keys
contained in this map if it is locked.
public Collection<V> values()
Returns an unmodifiable Collection view of the
values contained in this map if it is locked.
Copyright © 2000-2020 Apache Software Foundation. All Rights Reserved.