public abstract class AbstractMutableMultimap<K,V,C extends MutableCollection<V>> extends AbstractMultimap<K,V,C> implements MutableMultimap<K,V>
| Modifier and Type | Method and Description |
|---|---|
void |
clear() |
C |
get(K key)
Returns a view of all values associated with the given key.
|
boolean |
isEmpty()
Returns
true if there are no entries. |
boolean |
put(K key,
V value) |
boolean |
putAll(K key,
Iterable<? extends V> values) |
<KK extends K,VV extends V> |
putAll(Multimap<KK,VV> multimap) |
boolean |
putAllPairs(Pair<K,V>... pairs) |
void |
readExternal(ObjectInput in) |
boolean |
remove(Object key,
Object value) |
C |
removeAll(Object key) |
C |
replaceValues(K key,
Iterable<? extends V> values) |
int |
size()
Use the size method directly instead of totalSize internally so subclasses can override if necessary.
|
int |
sizeDistinct()
Returns the number of distinct keys.
|
MutableMap<K,RichIterable<V>> |
toMap()
Returns a new
MutableMap of keys from this Multimap to the mapped values as a RichIterable. |
void |
writeExternal(ObjectOutput out) |
containsKey, containsKeyAndValue, containsValue, equals, forEachKey, forEachKeyValue, forEachValue, hashCode, keyBag, keyMultiValuePairsView, keysView, keyValuePairsView, multiValuesView, notEmpty, toMap, toString, valuesViewnewEmptycontainsKey, containsKeyAndValue, containsValue, equals, forEachKey, forEachKeyValue, forEachValue, hashCode, keyBag, keyMultiValuePairsView, keysView, keyValuePairsView, multiValuesView, notEmpty, toImmutable, toMap, toMutable, valuesViewpublic int size()
public int sizeDistinct()
MultimapsizeDistinct in interface Multimap<K,V>public boolean isEmpty()
Multimaptrue if there are no entries.public boolean remove(Object key, Object value)
remove in interface MutableMultimap<K,V>public boolean putAllPairs(Pair<K,V>... pairs)
putAllPairs in interface MutableMultimap<K,V>public boolean putAll(K key, Iterable<? extends V> values)
putAll in interface MutableMultimap<K,V>public <KK extends K,VV extends V> boolean putAll(Multimap<KK,VV> multimap)
putAll in interface MutableMultimap<K,V>public C replaceValues(K key, Iterable<? extends V> values)
replaceValues in interface MutableMultimap<K,V>public void clear()
clear in interface MutableMultimap<K,V>public C get(K key)
MultimapRichIterable is returned.public MutableMap<K,RichIterable<V>> toMap()
MultimapMutableMap of keys from this Multimap to the mapped values as a RichIterable.public void writeExternal(ObjectOutput out) throws IOException
IOExceptionpublic void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
IOExceptionClassNotFoundExceptionCopyright © 2004–2017. All rights reserved.