K - The keyV - The valuepublic interface Multimap<K,V>
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Removes all of the mappings.
|
boolean |
containsKey(java.lang.Object key) |
java.util.Set<java.util.Map.Entry<K,java.util.Collection<V>>> |
entrySet()
Map.Entry.getValue() always returns an unmodifiable collection. |
java.util.Collection<V> |
get(K key)
This method never returns null.
|
boolean |
isEmpty() |
java.util.Set<K> |
keySet() |
boolean |
put(K key,
V value) |
boolean |
putAll(K key,
java.util.Collection<? extends V> values) |
java.util.Collection<V> |
replaceValues(K key,
java.lang.Iterable<? extends V> values)
Note that the original collection of values is completely replaced by a new collection which contains all elements from the given iterable.
|
int |
size()
Unlike Guava's
Multimap#size() this method returns the number of key-value mappings. |
java.util.Set<V> |
uniqueValues() |
java.util.List<V> |
values()
The list may include the same value multiple times if it occurs in multiple mappings or if the collection of values for the mapping allows duplicate
elements.
|
int size()
Multimap#size() this method returns the number of key-value mappings.boolean isEmpty()
true if there are no key-value mappingsjava.util.Collection<V> get(K key)
key - boolean put(K key, V value)
key - value - true if the the size of the collection associated with the given key increased, false otherwise (e.g. if the collection
of values doesn't allow duplicates)boolean putAll(K key, java.util.Collection<? extends V> values)
key - values - true if the the size of the collection associated with the given key increased, false otherwise (e.g. if the collection
of values doesn't allow duplicates)java.util.Collection<V> replaceValues(K key, java.lang.Iterable<? extends V> values)
key - values - boolean containsKey(java.lang.Object key)
key - true if the multimap contains a mapping for the given keyjava.util.Set<K> keySet()
java.util.List<V> values()
java.util.Set<V> uniqueValues()
java.util.Set<java.util.Map.Entry<K,java.util.Collection<V>>> entrySet()
Map.Entry.getValue() always returns an unmodifiable collection. Map.Entry.setValue(Object) operation is not supported.void clear()
Copyright © 2014. All Rights Reserved.