public final class CopyOnWriteHashMap<K,V> extends AbstractMap<K,V>
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
Constructor and Description |
---|
CopyOnWriteHashMap()
Create a new empty map.
|
Modifier and Type | Method and Description |
---|---|
static <T> T[] |
appendElement(T[] array,
T element) |
boolean |
containsKey(Object key) |
CopyOnWriteHashMap<K,V> |
copyAndPut(K key,
V value)
Associate
key with value and return a new copy
of the hash table. |
CopyOnWriteHashMap<K,V> |
copyAndPutAll(Map<? extends K,? extends V> other)
Same as
copyAndPut(Object, Object) but for an arbitrary number of entries. |
CopyOnWriteHashMap<K,V> |
copyAndRemove(Object key)
Remove the given key from this map.
|
CopyOnWriteHashMap<K,V> |
copyAndRemoveAll(Collection<?> keys)
Same as
copyAndRemove(Object) but for an arbitrary number of entries. |
static <K,V> CopyOnWriteHashMap<K,V> |
copyOf(Map<? extends K,? extends V> map)
Return a copy of the provided map.
|
Set<Map.Entry<K,V>> |
entrySet() |
V |
get(Object key) |
static <T> T[] |
insertElement(T[] array,
T element,
int index) |
int |
size() |
public static <K,V> CopyOnWriteHashMap<K,V> copyOf(Map<? extends K,? extends V> map)
public static <T> T[] appendElement(T[] array, T element)
public static <T> T[] insertElement(T[] array, T element, int index)
public boolean containsKey(Object key)
containsKey
in interface Map<K,V>
containsKey
in class AbstractMap<K,V>
public int size()
public CopyOnWriteHashMap<K,V> copyAndPut(K key, V value)
key
with value
and return a new copy
of the hash table. The current hash table is not modified.public CopyOnWriteHashMap<K,V> copyAndPutAll(Map<? extends K,? extends V> other)
copyAndPut(Object, Object)
but for an arbitrary number of entries.public CopyOnWriteHashMap<K,V> copyAndRemove(Object key)
public CopyOnWriteHashMap<K,V> copyAndRemoveAll(Collection<?> keys)
copyAndRemove(Object)
but for an arbitrary number of entries.Copyright © 2009–2017. All rights reserved.