K - the type of the keys of this map.V - the type of the values of this map.@Mutable @GenerateBuilder @GenerateSubclass public abstract class ConcurrentHashMap<K,V> extends ConcurrentHashMap<K,V> implements ConcurrentMap<K,V>
ConcurrentHashMap implementation with more useful methods.ConcurrentHashMap.KeySetView<K,V>AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>| Modifier | Constructor and Description |
|---|---|
protected |
ConcurrentHashMap(@NonNegative int initialCapacity,
@Positive float loadFactor,
@Positive int concurrencyLevel) |
protected |
ConcurrentHashMap(@Nonnull Map<? extends K,? extends V> map) |
| Modifier and Type | Method and Description |
|---|---|
@Nonnull ConcurrentHashMap<K,V> |
clone()
Returns a shallow copy of this map (the keys and values themselves are not cloned).
|
V |
putIfAbsentElseReturnPresent(K key,
V value)
Associates the given value with the given key, if the
given key is not already associated with another value.
|
@Nonnull String |
toString() |
static <K,V> ConcurrentHashMap<K,V> |
withMappingsOf(Map<? extends K,? extends V> map)
Returns a new concurrent hash map with the mappings of the given map or null if the given map is null.
|
clear, compute, computeIfAbsent, computeIfPresent, contains, containsKey, containsValue, elements, entrySet, equals, forEach, forEach, forEach, forEachEntry, forEachEntry, forEachKey, forEachKey, forEachValue, forEachValue, get, getOrDefault, hashCode, isEmpty, keys, keySet, keySet, mappingCount, merge, newKeySet, newKeySet, put, putAll, putIfAbsent, reduce, reduceEntries, reduceEntries, reduceEntriesToDouble, reduceEntriesToInt, reduceEntriesToLong, reduceKeys, reduceKeys, reduceKeysToDouble, reduceKeysToInt, reduceKeysToLong, reduceToDouble, reduceToInt, reduceToLong, reduceValues, reduceValues, reduceValuesToDouble, reduceValuesToInt, reduceValuesToLong, remove, remove, replace, replace, replaceAll, search, searchEntries, searchKeys, searchValues, size, valuesfinalize, getClass, notify, notifyAll, wait, wait, waitcompute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll@Recover
protected ConcurrentHashMap(@NonNegative @Default(value="16")
@NonNegative int initialCapacity,
@Positive @Default(value="0.75f")
@Positive float loadFactor,
@Positive @Default(value="1")
@Positive int concurrencyLevel)
@Pure @Capturable public static <K,V> ConcurrentHashMap<K,V> withMappingsOf(@NonCaptured @Unmodified Map<? extends K,? extends V> map)
@Impure @NonCapturable @Nonnull public V putIfAbsentElseReturnPresent(@Captured @Nonnull K key, @Captured @Nonnull V value)
ConcurrentMap@Pure @Capturable @Nonnull public @Nonnull ConcurrentHashMap<K,V> clone()
ConcurrentMapclone in class AbstractMap<K,V>Copyright © 2017. All rights reserved.