Top Fields Constructors Methods
org.eclipse.collections.impl.multimap

public abstract Class AbstractSynchronizedPutMultimap<K, V, C extends MutableCollection<V>>

extends AbstractMutableMultimap<K, V, C extends MutableCollection<V>>
Class Inheritance
Known Direct Subclasses
org.eclipse.collections.impl.multimap.bag.SynchronizedPutHashBagMultimap, org.eclipse.collections.impl.multimap.list.SynchronizedPutFastListMultimap, org.eclipse.collections.impl.multimap.set.SynchronizedPutUnifiedSetMultimap, org.eclipse.collections.impl.multimap.set.sorted.SynchronizedPutTreeSortedSetMultimap
Imports
java.util.Objects, java.util.concurrent.atomic.AtomicInteger, org.eclipse.collections.api.collection.MutableCollection, org.eclipse.collections.api.map.MutableMap, org.eclipse.collections.api.multimap.MutableMultimap, org.eclipse.collections.impl.map.mutable.ConcurrentHashMap, org.eclipse.collections.impl.utility.ArrayIterate, .Iterate

Field Summary

Modifier and TypeField and Description
private final AtomicInteger
Inherited from org.eclipse.collections.impl.multimap.AbstractMutableMultimap:
maptotalSize

Constructor Summary

AccessConstructor and Description
protected
protected

Method Summary

Modifier and TypeMethod and Description
private void
addAll(C existingValues, V[] values)

protected void
addToTotalSize(int value)

Overrides org.eclipse.collections.impl.multimap.AbstractMutableMultimap.addToTotalSize.

This method is provided to allow for subclasses to provide the behavior.

protected void
clearTotalSize()

Overrides org.eclipse.collections.impl.multimap.AbstractMutableMultimap.clearTotalSize.

This method is provided to allow for subclasses to provide the behavior.

protected MutableMap<K, C>
protected MutableMap<K, C>
protected void
decrementTotalSize()

Overrides org.eclipse.collections.impl.multimap.AbstractMutableMultimap.decrementTotalSize.

This method is provided to allow for subclasses to provide the behavior.

public C
getIfAbsentPutAll(K key, Iterable<? extends V> values)

Overrides org.eclipse.collections.impl.multimap.AbstractMutableMultimap.getIfAbsentPutAll.

Implements org.eclipse.collections.api.multimap.MutableMultimap.getIfAbsentPutAll.

Puts values into multimap if there are no values already associated with key.

private C
protected void
incrementTotalSize()

Overrides org.eclipse.collections.impl.multimap.AbstractMutableMultimap.incrementTotalSize.

This method is provided to allow for subclasses to provide the behavior.

public boolean
public int
size()

Overrides org.eclipse.collections.impl.multimap.AbstractMutableMultimap.size.

Implements org.eclipse.collections.api.multimap.Multimap.size.

Use the size method directly instead of totalSize internally so subclasses can override if necessary.

protected void
subtractFromTotalSize(int value)

Overrides org.eclipse.collections.impl.multimap.AbstractMutableMultimap.subtractFromTotalSize.

This method is provided to allow for subclasses to provide the behavior.

public MutableMultimap<K, V>
withKeyMultiValues(K key, V... values)

Overrides default org.eclipse.collections.api.multimap.MutableMultimap.withKeyMultiValues.

Puts the key / values combination into the MutableMultimap and returns the MutableMultimap (this).

Inherited from org.eclipse.collections.impl.multimap.AbstractMutableMultimap:
cleargetgetMapisEmptykeySetputAllputAllreadExternalreadValuesFromremoveremoveAllreplaceValuessizeDistincttoMaptoMapwriteExternal

Field Detail

atomicTotalSizeback to summary
private final AtomicInteger atomicTotalSize

Constructor Detail

AbstractSynchronizedPutMultimapback to summary
protected AbstractSynchronizedPutMultimap()
AbstractSynchronizedPutMultimapback to summary
protected AbstractSynchronizedPutMultimap(MutableMap<K, C> newMap)

Method Detail

addAllback to summary
private void addAll(C existingValues, V[] values)
addToTotalSizeback to summary
protected void addToTotalSize(int value)

Overrides org.eclipse.collections.impl.multimap.AbstractMutableMultimap.addToTotalSize.

Doc from org.eclipse.collections.impl.multimap.AbstractMutableMultimap.addToTotalSize.

This method is provided to allow for subclasses to provide the behavior. It should add the specified amount to the value that is returned by calling size().

Annotations
@Override
clearTotalSizeback to summary
protected void clearTotalSize()

Overrides org.eclipse.collections.impl.multimap.AbstractMutableMultimap.clearTotalSize.

Doc from org.eclipse.collections.impl.multimap.AbstractMutableMultimap.clearTotalSize.

This method is provided to allow for subclasses to provide the behavior. It should set the value returned by size() to 0.

Annotations
@Override
createMapback to summary
protected MutableMap<K, C> createMap()

Implements abstract org.eclipse.collections.impl.multimap.AbstractMutableMultimap.createMap.

Annotations
@Override
createMapWithKeyCountback to summary
protected MutableMap<K, C> createMapWithKeyCount(int keyCount)

Implements abstract org.eclipse.collections.impl.multimap.AbstractMutableMultimap.createMapWithKeyCount.

Annotations
@Override
decrementTotalSizeback to summary
protected void decrementTotalSize()

Overrides org.eclipse.collections.impl.multimap.AbstractMutableMultimap.decrementTotalSize.

Doc from org.eclipse.collections.impl.multimap.AbstractMutableMultimap.decrementTotalSize.

This method is provided to allow for subclasses to provide the behavior. It should remove 1 from the value that is returned by calling size().

Annotations
@Override
getIfAbsentPutAllback to summary
public C getIfAbsentPutAll(K key, Iterable<? extends V> values)

Overrides org.eclipse.collections.impl.multimap.AbstractMutableMultimap.getIfAbsentPutAll.

Implements org.eclipse.collections.api.multimap.MutableMultimap.getIfAbsentPutAll.

Doc from org.eclipse.collections.api.multimap.MutableMultimap.getIfAbsentPutAll.

Puts values into multimap if there are no values already associated with key. Then returns a view of the values associated with key, like the result of Multimap#get(Object)

Annotations
@Override
getIfAbsentPutCollectionback to summary
private C getIfAbsentPutCollection(K key)

Hides org.eclipse.collections.impl.multimap.AbstractMutableMultimap.getIfAbsentPutCollection.

incrementTotalSizeback to summary
protected void incrementTotalSize()

Overrides org.eclipse.collections.impl.multimap.AbstractMutableMultimap.incrementTotalSize.

Doc from org.eclipse.collections.impl.multimap.AbstractMutableMultimap.incrementTotalSize.

This method is provided to allow for subclasses to provide the behavior. It should add 1 to the value that is returned by calling size().

Annotations
@Override
putback to summary
public boolean put(K key, V value)

Overrides org.eclipse.collections.impl.multimap.AbstractMutableMultimap.put.

Implements org.eclipse.collections.api.multimap.MutableMultimap.put.

Annotations
@Override
sizeback to summary
public int size()

Overrides org.eclipse.collections.impl.multimap.AbstractMutableMultimap.size.

Implements org.eclipse.collections.api.multimap.Multimap.size.

Doc from org.eclipse.collections.impl.multimap.AbstractMutableMultimap.size.

Use the size method directly instead of totalSize internally so subclasses can override if necessary.

Annotations
@Override
subtractFromTotalSizeback to summary
protected void subtractFromTotalSize(int value)

Overrides org.eclipse.collections.impl.multimap.AbstractMutableMultimap.subtractFromTotalSize.

Doc from org.eclipse.collections.impl.multimap.AbstractMutableMultimap.subtractFromTotalSize.

This method is provided to allow for subclasses to provide the behavior. It should subtract the specified amount from the value that is returned by calling size().

Annotations
@Override
withKeyMultiValuesback to summary
public MutableMultimap<K, V> withKeyMultiValues(K key, V... values)

Overrides default org.eclipse.collections.api.multimap.MutableMultimap.withKeyMultiValues.

Doc from org.eclipse.collections.api.multimap.MutableMultimap.withKeyMultiValues.

Puts the key / values combination into the MutableMultimap and returns the MutableMultimap (this).

Annotations
@Override