public class MyConcurrentHashMap<K,V> extends ConcurrentHashMap<K,V>
| 限定符和类型 | 类和说明 |
|---|---|
static interface |
MyConcurrentHashMap.IValueFactory<V>
Interface for constructing new values on demand
|
ConcurrentHashMap.KeySetView<K,V>AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>| 构造器和说明 |
|---|
MyConcurrentHashMap() |
| 限定符和类型 | 方法和说明 |
|---|---|
V |
putIfAbsentElseGet(K key,
MyConcurrentHashMap.IValueFactory<V> valueFactory)
Puts the new key/value-pair if no mapping for the given key was in the in
the map before, otherwise it returns the existing mapping.
|
V |
putIfAbsentElseGet(K key,
V value)
Puts the new key/value-pair if no mapping for the given key was in the in
the map before, otherwise it returns the existing mapping.
|
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, toString, valuesclonepublic V putIfAbsentElseGet(K key, V value)
key - The key to check and put if it is not already in the mapvalue - The value to putpublic V putIfAbsentElseGet(K key, MyConcurrentHashMap.IValueFactory<V> valueFactory)
key - The key to check and put if it is not already in the mapvalueFactory - The factory that creates the value to put into the map on
demandCopyright © 2022 Fraunhofer SIT. All rights reserved.