Java java.util.concurrent ConcurrentHashMap fields, constructors, methods, implement or subclass

Example usage for Java java.util.concurrent ConcurrentHashMap fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for java.util.concurrent ConcurrentHashMap.

The text is from its open source code.

Subclass

java.util.concurrent.ConcurrentHashMap has subclasses.
Click this link to see all its subclasses.

Field

KeySetViewkeySet
ValuesViewvalues
EntrySetViewentrySet

Constructor

ConcurrentHashMap()
Creates a new, empty map with the default initial table size (16).
ConcurrentHashMap(int initialCapacity)
Creates a new, empty map with an initial table size accommodating the specified number of elements without the need to dynamically resize.
ConcurrentHashMap(Map m)
Creates a new map with the same mappings as the given map.
ConcurrentHashMap(int initialCapacity, float loadFactor, int concurrencyLevel)
Creates a new, empty map with an initial table size based on the given number of elements ( initialCapacity ), initial table density ( loadFactor ), and number of concurrently updating threads ( concurrencyLevel ).
ConcurrentHashMap(int initialCapacity, float loadFactor)
Creates a new, empty map with an initial table size based on the given number of elements ( initialCapacity ) and initial table density ( loadFactor ).

Method

voidclear()
Removes all of the mappings from this map.
Vcompute(K key, BiFunction remappingFunction)
Attempts to compute a mapping for the specified key and its current mapped value (or null if there is no current mapping).
booleancontains(Object value)
Tests if some key maps into the specified value in this table.
booleancontainsKey(Object key)
Tests if the specified object is a key in this table.
voidforEach(BiConsumer action)
voidforEachValue(long parallelismThreshold, Consumer action)
Performs the given action for each value.
Vget(Object key)
Returns the value to which the specified key is mapped, or null if this map contains no mapping for the key.
booleanisEmpty()
Enumerationkeys()
Returns an enumeration of the keys in this table.
KeySetViewnewKeySet()
Creates a new Set backed by a ConcurrentHashMap from the given type to Boolean.TRUE .
KeySetViewnewKeySet(int initialCapacity)
Creates a new Set backed by a ConcurrentHashMap from the given type to Boolean.TRUE .
Vput(K key, V value)
Maps the specified key to the specified value in this table.
voidputAll(Map m)
Copies all of the mappings from the specified map to this one.
VputIfAbsent(K key, V value)
Map.EntryreduceEntries(long parallelismThreshold, BiFunction, Map.Entry, ? extends Map.Entry> reducer)
Returns the result of accumulating all entries using the given reducer to combine values, or null if none.
Vremove(Object key)
Removes the key (and its corresponding value) from this map.
booleanremove(Object key, Object value)
booleanreplace(K key, V oldValue, V newValue)
Vreplace(K key, V value)
Usearch(long parallelismThreshold, BiFunction searchFunction)
Returns a non-null result from applying the given search function on each (key, value), or null if none.
intsize()
StringtoString()
Returns a string representation of this map.