public final class CopyOnWriteHashMap<K,V>
extends java.util.AbstractMap<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(java.lang.Object key) |
CopyOnWriteHashMap<K,V> |
copyAndPut(K key,
V value)
Associate
key with value and return a new copy
of the hash table. |
<K1 extends K,V1 extends V> |
copyAndPutAll(java.lang.Iterable<java.util.Map.Entry<K1,V1>> entries) |
CopyOnWriteHashMap<K,V> |
copyAndPutAll(java.util.Map<? extends K,? extends V> other)
Same as
copyAndPut(Object, Object) but for an arbitrary number of entries. |
<K1 extends K,V1 extends V> |
copyAndPutAll(java.util.stream.Stream<java.util.Map.Entry<K1,V1>> entries) |
CopyOnWriteHashMap<K,V> |
copyAndRemove(java.lang.Object key)
Remove the given key from this map.
|
CopyOnWriteHashMap<K,V> |
copyAndRemoveAll(java.util.Collection<?> keys)
Same as
copyAndRemove(Object) but for an arbitrary number of entries. |
static <K,V> CopyOnWriteHashMap<K,V> |
copyOf(java.util.Map<? extends K,? extends V> map)
Return a copy of the provided map.
|
java.util.Set<java.util.Map.Entry<K,V>> |
entrySet() |
V |
get(java.lang.Object key) |
static <T> T[] |
insertElement(T[] array,
T element,
int index) |
int |
size() |
clear, clone, containsValue, equals, hashCode, isEmpty, keySet, put, putAll, remove, toString, values
public static <K,V> CopyOnWriteHashMap<K,V> copyOf(java.util.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(java.lang.Object key)
public V get(java.lang.Object key)
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(java.util.Map<? extends K,? extends V> other)
copyAndPut(Object, Object)
but for an arbitrary number of entries.public <K1 extends K,V1 extends V> CopyOnWriteHashMap<K,V> copyAndPutAll(java.lang.Iterable<java.util.Map.Entry<K1,V1>> entries)
public <K1 extends K,V1 extends V> CopyOnWriteHashMap<K,V> copyAndPutAll(java.util.stream.Stream<java.util.Map.Entry<K1,V1>> entries)
public CopyOnWriteHashMap<K,V> copyAndRemove(java.lang.Object key)
public CopyOnWriteHashMap<K,V> copyAndRemoveAll(java.util.Collection<?> keys)
copyAndRemove(Object)
but for an arbitrary number of entries.