| Modifier and Type | Class and Description |
|---|---|
| private static class | |
| private class | |
| private class | |
| private abstract class | |
| private static class | |
| private class | |
| private class | |
| private static class | |
| private class | |
| private class |
| Modifier and Type | Field and Description |
|---|---|
| private static final int | |
| private static final long | |
| private static final int | |
| private static final int | MAXIMUM_CAPACITY
The maximum capacity, used if a higher value is implicitly specified by either of the constructors with arguments. |
| private static final long | |
| private static final int | |
| private static final int | |
| private int[] | |
| private static final Object | |
| private static final Object | |
| private static final Object | |
| private static final long | |
| private volatile int | |
| private static final int | |
| private static final long | |
| private volatile Object[] | table
The table, resized as necessary. |
| private static final AtomicReferenceFieldUpdater | |
| private static final Unsafe |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| private static Object | |
| private static boolean | |
| public void | clear()
Implements java. Removes all of the mappings from this map (optional operation). |
| public MutableMap | clone()
Implements abstract org. Implements org. Creates and returns a copy of this object. |
| public <E> MutableMap | collectKeysAndValues(Iterable<E> iterable, Function<? super E, ? extends K> keyFunction, Function<? super E, ? extends V> valueFunction)
Implements org. Adds all the entries derived from |
| public boolean | containsKey(Object key)
Implements org. Returns |
| public boolean | containsValue(Object value)
Implements org. Returns |
| public int | |
| private ConcurrentHashMapUnsafe. | createReplacementChainForRemoval(ConcurrentHashMapUnsafe.
|
| public Set | entrySet()
Implements java. Returns a |
| public boolean | equals(Object o)
Overrides java. Implements org. Follows the same general contract as |
| public void | forEachKey(Procedure<? super K> procedure)
Overrides org. Implements org. Calls the |
| public void | forEachKeyValue(Procedure2<? super K, ? super V> procedure)
Implements org. Calls the |
| public void | forEachValue(Procedure<? super V> procedure)
Overrides org. Implements org. Calls the procedure with each value of the map. |
| public <P> void | forEachWith(Procedure2<? super V, ? super P> procedure, P parameter)
Overrides org. Implements org. The procedure2 is evaluated for each element in the iterable with the specified parameter provided as the second argument. |
| public void | forEachWithIndex(ObjectIntProcedure<? super V> objectIntProcedure)
Overrides org. Implements org. Iterates over the iterable passing each element and the current relative int index to the specified instance of ObjectIntProcedure. |
| public V | get(Object key)
Implements org. Returns the value to which the specified key is mapped,
or |
| private ConcurrentHashMapUnsafe. | |
| public V | getIfAbsent(K key, Function0<? extends V> function)
Overrides org. Implements org. Return the value in the Map that corresponds to the specified key, or if there is no value at the key, return the result of evaluating the specified Function0. |
| public V | getIfAbsentPut(K key, Function<? super K, ? extends V> factory)
Overrides org. Implements org. Get and return the value in the Map at the specified key. |
| public V | getIfAbsentPut(K key, Function0<? extends V> factory)
Overrides org. Implements org. Get and return the value in the Map at the specified key. |
| public V | getIfAbsentPut(K key, V value)
Overrides org. Implements org. Get and return the value in the Map at the specified key. |
| public <P> V | getIfAbsentPutWith(K key, Function<? super P, ? extends V> function, P parameter)
Overrides org. Implements org. Get and return the value in the Map at the specified key. |
| public <P> V | getIfAbsentWith(K key, Function<? super P, ? extends V> function, P parameter)
Overrides org. Implements org. Return the value in the Map that corresponds to the specified key, or if there is no value at the key, return the result of evaluating the specified function and parameter. |
| private static Unsafe | |
| private int | |
| public int | hashCode()
Overrides java. Implements org. Follows the same general contract as |
| private Object[] | |
| private Object[] | |
| public <A> A | ifPresentApply(K key, Function<? super V, ? extends A> function)
Overrides org. Implements org. If there is a value in the Map that corresponds to the specified key return the result of applying the specified Function on the value, otherwise return null. |
| private void | |
| private boolean | |
| private void | |
| private static int | |
| public boolean | isEmpty()
Overrides org. Implements org. Returns |
| public Iterator | iterator()
Overrides org. Implements java. Returns an iterator over elements of type |
| public Set | |
| public V | merge(K key, V value, BiFunction<? super V, ? super V, ? extends V> remappingFunction)
Overrides default java. Implements org. A concurrent implementation of |
| public <K, V> MutableMap | newEmpty(int capacity)
Implements abstract org. Creates a new instance of the same type, using the given capacity and the default growth parameters. |
| public MutableMap | newEmpty()
Implements org. Creates a new instance of the same type, using the default capacity and growth parameters. |
| public static <K, V> ConcurrentHashMapUnsafe | |
| public static <K, V> ConcurrentHashMapUnsafe | |
| public static <NK, NV> ConcurrentHashMapUnsafe | |
| public boolean | notEmpty()
Overrides default org. The English equivalent of !this.isEmpty() |
| private boolean | |
| public void | |
| public void | |
| public V | put(K key, V value)
Implements java. Associates the specified value with the specified key in this map (optional operation). |
| public void | putAll(Map<? extends K, ? extends V> map)
Implements java. Copies all of the mappings from the specified map to this map (optional operation). |
| public void | |
| public V | putIfAbsent(K key, V value)
Overrides default java. Implements java. If the specified key is not already associated with a value, associates it with the given value. |
| public <P1, P2> V | putIfAbsentGetIfPresent(K
The "mutable" key, which has the same identity/hashcode as the inserted key, only during this call key, Function2<? super K, ? super V, ? extends K> If the record is absent, the transformer will transform the "mutable" key into an immutable copy of the key.
Note that the transformed key must have the same identity/hashcode as the original "mutable" key. keyTransformer, Function3<P1, P2, ? super K, ? extends V> It creates an object, if it is not present in the map already. factory, P1 param1, P2 param2)It puts an object into the map based on the key. |
| public void | readExternal(ObjectInput in)
Implements java. The object implements the readExternal method to restore its contents by calling the methods of DataInput for primitive types and readObject for objects, strings and arrays. |
| public boolean | remove(Object key, Object value)
Overrides default java. Implements java. Removes the entry for a key only if currently mapped to a given value. |
| public V | remove(Object key)
Implements java. Removes the mapping for a key from this map if it is present (optional operation). |
| public V | removeKey(K key)
Implements org. Remove an entry from the map at the specified |
| public boolean | replace(K key, V oldValue, V newValue)
Overrides default java. Implements java. Replaces the entry for a key only if currently mapped to a given value. |
| public V | replace(K key, V value)
Overrides default java. Implements java. Replaces the entry for a key only if currently mapped to some value. |
| private void | |
| private void | |
| private void | |
| private void | sequentialForEachKeyValue(Procedure2<? super K, ? super V> block, Object[] currentArray, int start, int end)
|
| private void | |
| private void | |
| private static void | |
| public int | size()
Implements org. Returns the number of key-value mappings in this map. |
| private V | |
| private V | slowMerge(K key, V value, BiFunction<? super V, ? super V, ? extends V> remappingFunction, int hash, Object[] currentArray)
|
| private V | |
| private V | |
| private boolean | |
| private V | |
| private V | slowUpdateValue(K key, Function0<? extends V> factory, Function<? super V, ? extends V> function, int hash, Object[] currentArray)
|
| private <P> V | slowUpdateValueWith(K key, Function0<? extends V> factory, Function2<? super V, ? super P, ? extends V> function, P parameter, int hash, Object[] currentArray)
|
| public ConcurrentMutableMap | tap(Procedure<? super V> procedure)
Overrides org. Implements org. Executes the Procedure for each value of the map and returns |
| public ImmutableMap | toImmutable()
Overrides org. Implements org. Returns an immutable copy of this map. |
| public String | toString()
Overrides org. Implements org. Returns a string with the keys and values of this map separated by commas with spaces and enclosed in curly braces. |
| private void | |
| private void | |
| public V | updateValue(K key, Function0<? extends V> factory, Function<? super V, ? extends V> function)
Overrides org. Implements org. Looks up the value associated with |
| public <P> V | updateValueWith(K key, Function0<? extends V> factory, Function2<? super V, ? super P, ? extends V> function, P parameter)
Overrides org. Implements org. Same as |
| public Collection | values()
Implements java. Returns a |
| public ConcurrentHashMapUnsafe | withAllKeyValueArguments(Pair<? extends K, ? extends V>... keyValues)
Overrides org. Implements org. Convenience var-args version of withAllKeyValues |
| public ConcurrentHashMapUnsafe | withAllKeyValues(Iterable<? extends Pair<? extends K, ? extends V>> keyValues)
Overrides org. Implements org. This method allows mutable, fixed size, and immutable maps the ability to add elements to their existing elements. |
| public ConcurrentHashMapUnsafe | withKeyValue(K key, V value)
Overrides org. Implements org. This method allows mutable, fixed size, and immutable maps the ability to add elements to their existing elements. |
| public ConcurrentHashMapUnsafe | withoutAllKeys(Iterable<? extends K> keys)
Overrides org. Implements org. This method allows mutable, fixed size, and immutable maps the ability to remove elements from their existing elements. |
| public ConcurrentHashMapUnsafe | withoutKey(K key)
Overrides org. Implements org. This method allows mutable, fixed size, and immutable maps the ability to remove elements from their existing elements. |
| public void | writeExternal(ObjectOutput out)
Implements java. The object implements the writeExternal method to save its contents by calling the methods of DataOutput for its primitive values or calling the writeObject method of ObjectOutput for objects, strings, and arrays. |