K
- Key typeV
- Value type@InterfaceAudience.Private @InterfaceStability.Evolving public class ConcurrentIndex<K,V> extends Object
com.google.common.collect.Multiset
, with the following exceptions:
Constructor and Description |
---|
ConcurrentIndex(<any> 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(<any> valueSetFactory)
valueSetFactory
- The factory instancepublic 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 key