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 void
clear()
C
get(K key)
C
getIfAbsentPutAll(K key, Iterable<? extends V> values)
boolean
isEmpty()
SetIterable<K>
keySet()
boolean
put(K key, V value)
boolean
putAll(K key, Iterable<? extends V> values)
<KK extends K,VV extends V>
booleanputAll(Multimap<KK,VV> multimap)
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()
MutableMap<K,RichIterable<V>>
toMap()
<R extends Collection<V>>
MutableMap<K,R>toMap(Function0<R> collectionFactory)
void
writeExternal(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:
sizeDistinct
in interfaceMultimap<K,V>
-
remove
public boolean remove(Object key, Object value)
- Specified by:
remove
in interfaceMutableMultimap<K,V>
-
putAll
public boolean putAll(K key, Iterable<? extends V> values)
- Specified by:
putAll
in interfaceMutableMultimap<K,V>
-
putAll
public <KK extends K,VV extends V> boolean putAll(Multimap<KK,VV> multimap)
- Specified by:
putAll
in interfaceMutableMultimap<K,V>
-
replaceValues
public C replaceValues(K key, Iterable<? extends V> values)
- Specified by:
replaceValues
in interfaceMutableMultimap<K,V>
-
removeAll
public C removeAll(Object key)
- Specified by:
removeAll
in interfaceMutableMultimap<K,V>
-
clear
public void clear()
- Specified by:
clear
in interfaceMutableMultimap<K,V>
-
getIfAbsentPutAll
public C getIfAbsentPutAll(K key, Iterable<? extends V> values)
- Specified by:
getIfAbsentPutAll
in 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:
IOException
ClassNotFoundException
-
-