public class MultiKeyConcurrentHashMap<K,V> extends Object
Constructor and Description |
---|
MultiKeyConcurrentHashMap()
Creates a new, empty map with a default initial capacity, load factor,
and concurrencyLevel.
|
MultiKeyConcurrentHashMap(int initialCapacity)
Creates a new, empty map with the specified initial capacity, and with
default load factor and concurrencyLevel.
|
MultiKeyConcurrentHashMap(int initialCapacity,
float loadFactor,
int concurrencyLevel)
Creates a new, empty map with the specified initial capacity, load
factor, and concurrency level.
|
Modifier and Type | Method and Description |
---|---|
void |
clear()
Removes all mappings from this map.
|
boolean |
contains(Object value)
Legacy method testing if some key maps into the specified value in this
table.
|
boolean |
containsKey(Object key)
Tests if the specified object is a key in this table.
|
boolean |
containsKey(Object key1,
Object key2) |
boolean |
containsKey(Object key1,
Object key2,
Object key3) |
boolean |
containsKey(Object key1,
Object key2,
Object key3,
Object key4) |
boolean |
containsValue(Object value)
Returns true if this map maps one or more keys to the specified
value.
|
Set<Map.Entry<K,V>> |
entrySet()
Unsupported.
|
V |
get(Object key)
Returns the value to which the specified key is mapped in this table.
|
V |
get(Object key1,
Object key2) |
V |
get(Object key1,
Object key2,
Object key3) |
V |
get(Object key1,
Object key2,
Object key3,
Object key4) |
boolean |
isEmpty() |
Set<K> |
keySet()
Unsupported
|
V |
put(K key1,
K key2,
K key3,
K key4,
V value) |
V |
put(K key1,
K key2,
K key3,
V value) |
V |
put(K key1,
K key2,
V value) |
V |
put(K key,
V value)
Maps the specified key to the specified value in this
table.
|
V |
putIfAbsent(K key1,
K key2,
K key3,
K key4,
V value) |
V |
putIfAbsent(K key1,
K key2,
K key3,
V value) |
V |
putIfAbsent(K key1,
K key2,
V value) |
V |
putIfAbsent(K key,
V value)
If the specified key is not already associated with a value, associate it
with the given value.
|
V |
remove(K key) |
V |
remove(K key1,
K key2) |
V |
remove(K key1,
K key2,
K key3) |
V |
remove(K key1,
K key2,
K key3,
K key4) |
V |
replace(K key,
V value)
Replace entry for key only if currently mapped to some value.
|
boolean |
replace(K key,
V oldValue,
V newValue)
Replace entry for key only if currently mapped to given value.
|
int |
size() |
Collection<V> |
values()
Unsupported.
|
public MultiKeyConcurrentHashMap(int initialCapacity, float loadFactor, int concurrencyLevel)
initialCapacity
- the initial capacity. The implementation performs
internal sizing to accommodate this many
elements.loadFactor
- the load factor threshold, used to control
resizing. Resizing may be performed when the
average number of elements per bin exceeds this
threshold.concurrencyLevel
- the estimated number of concurrently updating
threads. The implementation performs internal
sizing to try to accommodate this many threads.IllegalArgumentException
- if the initial capacity is negative or
the load factor or concurrencyLevel are
nonpositive.public MultiKeyConcurrentHashMap(int initialCapacity)
initialCapacity
- the initial capacity. The implementation performs
internal sizing to accommodate this many
elements.IllegalArgumentException
- if the initial capacity of elements is
negative.public MultiKeyConcurrentHashMap()
public boolean isEmpty()
Map.isEmpty()
public int size()
Map.size()
public V get(Object key)
key
- a key in the table.NullPointerException
- if the key is null.public V get(Object key1, Object key2)
get(Object)
public V get(Object key1, Object key2, Object key3)
get(Object)
public boolean containsKey(Object key)
key
- possible key.NullPointerException
- if the key is null.public boolean containsKey(Object key1, Object key2)
containsKey(Object)
public boolean containsKey(Object key1, Object key2, Object key3)
containsKey(Object)
public boolean containsKey(Object key1, Object key2, Object key3, Object key4)
containsKey(Object)
public boolean containsValue(Object value)
value
- value whose presence in this map is to be tested.NullPointerException
- if the value is null.public boolean contains(Object value)
containsValue(java.lang.Object)
, and exists solely to ensure full compatibility with
class Hashtable
, which supported this method prior to
introduction of the Java Collections framework.value
- a value to search for.NullPointerException
- if the value is null.public V put(K key, V value)
The value can be retrieved by calling the get method with a key that is equal to the original key.
key
- the table key.value
- the value.NullPointerException
- if the key or value is null.public V put(K key1, K key2, V value)
put(Object, Object)
public V putIfAbsent(K key, V value)
if (!map.containsKey(key)) return map.put(key, value); else return map.get(key);Except that the action is performed atomically.
key
- key with which the specified value is to be associated.value
- value to be associated with the specified key.NullPointerException
- if the specified key or value is
null.public V putIfAbsent(K key1, K key2, V value)
putIfAbsent(Object, Object)
public V putIfAbsent(K key1, K key2, K key3, V value)
putIfAbsent(Object, Object)
public V putIfAbsent(K key1, K key2, K key3, K key4, V value)
putIfAbsent(Object, Object)
public V remove(K key)
Map.remove(Object)
public V remove(K key1, K key2)
Map.remove(Object)
public V remove(K key1, K key2, K key3)
Map.remove(Object)
public boolean replace(K key, V oldValue, V newValue)
if (map.get(key).equals(oldValue)) { map.put(key, newValue); return true; } else return false;except that the action is performed atomically.
key
- key with which the specified value is associated.oldValue
- value expected to be associated with the specified key.newValue
- value to be associated with the specified key.NullPointerException
- if the specified key or values are
null.public V replace(K key, V value)
if ((map.containsKey(key)) { return map.put(key, value); } else return null;except that the action is performed atomically.
key
- key with which the specified value is associated.value
- value to be associated with the specified key.NullPointerException
- if the specified key or value is
null.public void clear()
public Collection<V> values()
Comments to: faces-dev@eclipse.org.
Copyright © 2019 Eclipse Foundation. All rights reserved.
Use is subject to license terms.