Class AbstractMutableMultimap<K,V,C extends MutableCollection<V>>
- java.lang.Object
-
- org.eclipse.collections.impl.multimap.AbstractMultimap<K,V,C>
-
- org.eclipse.collections.impl.multimap.AbstractMutableMultimap<K,V,C>
-
- All Implemented Interfaces:
Multimap<K,V>,MutableMultimap<K,V>
- Direct Known Subclasses:
AbstractMutableBagMultimap,AbstractMutableListMultimap,AbstractMutableSetMultimap,AbstractSynchronizedPutMultimap,TreeBagMultimap,TreeBagMultimap,TreeBagMultimap,TreeSortedSetMultimap
public abstract class AbstractMutableMultimap<K,V,C extends MutableCollection<V>> extends AbstractMultimap<K,V,C> implements MutableMultimap<K,V>
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()Cget(K key)CgetIfAbsentPutAll(K key, Iterable<? extends V> values)booleanisEmpty()SetIterable<K>keySet()booleanput(K key, V value)booleanputAll(K key, Iterable<? extends V> values)<KK extends K,VV extends V>
booleanputAll(Multimap<KK,VV> multimap)voidreadExternal(ObjectInput in)booleanremove(Object key, Object value)CremoveAll(Object key)CreplaceValues(K key, Iterable<? extends V> values)intsize()Use the size method directly instead of totalSize internally so subclasses can override if necessary.intsizeDistinct()MutableMap<K,RichIterable<V>>toMap()<R extends Collection<V>>
MutableMap<K,R>toMap(Function0<R> collectionFactory)voidwriteExternal(ObjectOutput out)-
Methods inherited from class org.eclipse.collections.impl.multimap.AbstractMultimap
collectKeyMultiValues, collectKeysValues, collectValues, containsKey, containsKeyAndValue, containsValue, equals, forEachKey, forEachKeyMultiValues, forEachKeyValue, forEachValue, hashCode, keyBag, keyMultiValuePairsView, keysView, keyValuePairsView, multiValuesView, notEmpty, rejectKeysMultiValues, rejectKeysValues, selectKeysMultiValues, selectKeysValues, toString, valuesView
-
Methods inherited from interface org.eclipse.collections.api.multimap.Multimap
collectKeyMultiValues, collectKeysValues, collectValues, containsKey, containsKeyAndValue, containsValue, equals, forEachKey, forEachKeyMultiValues, forEachKeyValue, forEachValue, hashCode, keyBag, keyMultiValuePairsView, keysView, keyValuePairsView, multiValuesView, notEmpty, rejectKeysMultiValues, rejectKeysValues, selectKeysMultiValues, selectKeysValues, toImmutable, toMutable, valuesView
-
Methods inherited from interface org.eclipse.collections.api.multimap.MutableMultimap
add, asSynchronized, collectKeyMultiValues, collectKeysValues, collectValues, flip, newEmpty, putAllPairs, putAllPairs, rejectKeysMultiValues, rejectKeysValues, selectKeysMultiValues, selectKeysValues, withKeyMultiValues, withKeyValue
-
-
-
-
Method Detail
-
size
public int size()
Use the size method directly instead of totalSize internally so subclasses can override if necessary.
-
sizeDistinct
public int sizeDistinct()
- Specified by:
sizeDistinctin interfaceMultimap<K,V>
-
remove
public boolean remove(Object key, Object value)
- Specified by:
removein interfaceMutableMultimap<K,V>
-
putAll
public boolean putAll(K key, Iterable<? extends V> values)
- Specified by:
putAllin interfaceMutableMultimap<K,V>
-
putAll
public <KK extends K,VV extends V> boolean putAll(Multimap<KK,VV> multimap)
- Specified by:
putAllin interfaceMutableMultimap<K,V>
-
replaceValues
public C replaceValues(K key, Iterable<? extends V> values)
- Specified by:
replaceValuesin interfaceMutableMultimap<K,V>
-
removeAll
public C removeAll(Object key)
- Specified by:
removeAllin interfaceMutableMultimap<K,V>
-
clear
public void clear()
- Specified by:
clearin interfaceMutableMultimap<K,V>
-
getIfAbsentPutAll
public C getIfAbsentPutAll(K key, Iterable<? extends V> values)
- Specified by:
getIfAbsentPutAllin interfaceMutableMultimap<K,V>
-
toMap
public MutableMap<K,RichIterable<V>> toMap()
-
toMap
public <R extends Collection<V>> MutableMap<K,R> toMap(Function0<R> collectionFactory)
-
writeExternal
public void writeExternal(ObjectOutput out) throws IOException
- Throws:
IOException
-
readExternal
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
- Throws:
IOExceptionClassNotFoundException
-
-