Note
this is not a secure map. It should not be used in situations where the map is populated from user input.
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public synchronized void | clear()
Implements java. Removes all of the mappings from this map (optional operation). |
| public boolean | containsKey(Object
key whose presence in this map is to be tested key)Implements java. Returns |
| public boolean | containsValue(Object
value whose presence in this map is to be tested value)Implements java. Returns |
| public Set | entrySet()
Implements java. Returns a |
| public V | get(Object
the key whose associated value is to be returned key)Implements java. Returns the value to which the specified key is mapped,
or |
| public boolean | |
| public Set | |
| public synchronized V | put(K
key with which the specified value is to be associated key, V value to be associated with the specified key value)Implements java. Associates the specified value with the specified key in this map (optional operation). |
| public synchronized void | putAll(Map<? extends K, ? extends V>
mappings to be stored in this map m)Implements java. Copies all of the mappings from the specified map to this map (optional operation). |
| public synchronized V | putIfAbsent(K
key with which the specified value is to be associated key, V value to be associated with the specified key value)Implements java. If the specified key is not already associated with a value, associates it with the given value. |
| private V | |
| public synchronized boolean | remove(Object
key with which the specified value is associated key, Object value expected to be associated with the specified key value)Implements java. Removes the entry for a key only if currently mapped to a given value. |
| public synchronized V | remove(Object
key whose mapping is to be removed from the map key)Implements java. Removes the mapping for a key from this map if it is present (optional operation). |
| public V | |
| public synchronized boolean | replace(K
key with which the specified value is associated key, V value expected to be associated with the specified key oldValue, V value to be associated with the specified key newValue)Implements java. Replaces the entry for a key only if currently mapped to a given value. |
| public synchronized V | replace(K
key with which the specified value is associated key, V value to be associated with the specified key value)Implements java. Replaces the entry for a key only if currently mapped to some value. |
| public int | |
| public Collection | values()
Implements java. Returns a |
| delegate | back to summary |
|---|---|
| private volatile Map<K, V> delegate | |
| CopyOnWriteMap | back to summary |
|---|---|
| public CopyOnWriteMap() | |
| CopyOnWriteMap | back to summary |
|---|---|
| public CopyOnWriteMap(Map<K, V> existing) | |
| clear | back to summary |
|---|---|
| public synchronized void clear() Implements java. Doc from java. Removes all of the mappings from this map (optional operation). The map will be empty after this call returns.
| |
| containsKey | back to summary |
|---|---|
| public boolean containsKey(Object key) Implements java. Doc from java. Returns | |
| containsValue | back to summary |
|---|---|
| public boolean containsValue(Object value) Implements java. Doc from java. Returns | |
| entrySet | back to summary |
|---|---|
| public Set Implements java. Doc from java. Returns a | |
| get | back to summary |
|---|---|
| public V get(Object key) Implements java. Doc from java. Returns the value to which the specified key is mapped,
or More formally, if this map contains a mapping from a key
If this map permits null values, then a return value of
| |
| isEmpty | back to summary |
|---|---|
| public boolean isEmpty() Implements java. Doc from java. Returns
| |
| keySet | back to summary |
|---|---|
| public Set Implements java. Doc from java. Returns a | |
| put | back to summary |
|---|---|
| public synchronized V put(K key, V value) Implements java. Doc from java. Associates the specified value with the specified key in this map
(optional operation). If the map previously contained a mapping for
the key, the old value is replaced by the specified value. (A map
| |
| putAll | back to summary |
|---|---|
| public synchronized void putAll(Map<? extends K, ? extends V> m) Implements java. Doc from java. Copies all of the mappings from the specified map to this map
(optional operation). The effect of this call is equivalent to that
of calling | |
| putIfAbsent | back to summary |
|---|---|
| public synchronized V putIfAbsent(K key, V value) Implements java. Doc from java. If the specified key is not already associated
with a value, associates it with the given value.
This is equivalent to, for this
except that the action is performed atomically.
| |
| putInternal | back to summary |
|---|---|
| private V putInternal(final K key, final V value) | |
| remove | back to summary |
|---|---|
| public synchronized boolean remove(Object key, Object value) Implements java. Doc from java. Removes the entry for a key only if currently mapped to a given value.
This is equivalent to, for this
except that the action is performed atomically.
| |
| remove | back to summary |
|---|---|
| public synchronized V remove(Object key) Implements java. Doc from java. Removes the mapping for a key from this map if it is present
(optional operation). More formally, if this map contains a mapping
from key Returns the value to which this map previously associated the key,
or If this map permits null values, then a return value of
The map will not contain a mapping for the specified key once the call returns. | |
| removeInternal | back to summary |
|---|---|
| public V removeInternal(final Object key) | |
| replace | back to summary |
|---|---|
| public synchronized boolean replace(K key, V oldValue, V newValue) Implements java. Doc from java. Replaces the entry for a key only if currently mapped to a given value.
This is equivalent to, for this
except that the action is performed atomically.
| |
| replace | back to summary |
|---|---|
| public synchronized V replace(K key, V value) Implements java. Doc from java. Replaces the entry for a key only if currently mapped to some value.
This is equivalent to, for this
except that the action is performed atomically.
| |
| size | back to summary |
|---|---|
| public int size() Implements java. Doc from java. Returns the number of key-value mappings in this map. If the
map contains more than
| |
| values | back to summary |
|---|---|
| public Collection Implements java. Doc from java. Returns a
| |