K - Key typeV - Value type@InterfaceAudience.Private @InterfaceStability.Evolving public class ConcurrentIndex<K,V> extends Object
Multiset, with the following exceptions:
| Constructor and Description |
|---|
ConcurrentIndex(Comparator<V> valueComparator)
Creates an instance using the DefaultValueSetFactory for sets,
which in turn creates instances of
ConcurrentSkipListSet |
ConcurrentIndex(com.google.common.base.Supplier<Set<V>> valueSetFactory)
Creates an instance with a specified factory object for sets to be
associated with a given key.
|
| Modifier and Type | Method and Description |
|---|---|
void |
put(K key,
V value)
Associate a new unique value with a specified key.
|
boolean |
remove(K key,
V value)
Removes the association between a specified key and value.
|
Set<V> |
values(K key)
Get all values associated with a specified key or null if no values are
associated.
|
public ConcurrentIndex(com.google.common.base.Supplier<Set<V>> valueSetFactory)
valueSetFactory - The factory instancepublic ConcurrentIndex(Comparator<V> valueComparator)
ConcurrentSkipListSetvalueComparator - A Comparator for value typespublic void put(K key, V value)
key - The keyvalue - An additional unique value we want to associate with a keypublic Set<V> values(K key)
ConcurrentModificationException may be thrown.key - The keyCopyright © 2014 The Apache Software Foundation. All rights reserved.