public interface

MultiMap

implements Map<K, V>
com.atlassian.jira.util.collect.MultiMap<K, V, C extends java.util.Collection<V>>

Summary

Public Methods
C allValues()
Get all elements in all Collections.
boolean contains(Object value)
Does this MultiMap contain the value in any of its value collections.
boolean containsValue(Collection<?> value)
Does this MultiMap contain the Collection as any of its value collections.
void copyTo(Collection<V> collection)
Copy all values to the supplied collection.
boolean putSingle(K key, V value)
Put a single value in to the appropriate mapped collection.
int sizeAll()
The sum of sizes of all contained keys.
[Expand]
Inherited Methods
From interface java.util.Map

Public Methods

public C allValues ()

Get all elements in all Collections. This returns the same type as the mapped Collections, so if this MultiMap contains lists then there will be the same number of elements as sizeAll(), whereas if the MultiMap contains sets then duplicates may be removed. If a different type of Collection

The returned Collection is immutable.

Returns
  • a Collection

public boolean contains (Object value)

Does this MultiMap contain the value in any of its value collections.

Parameters
value the single value to check for
Returns
  • true if the value is contained in any of the mapped collections

public boolean containsValue (Collection<?> value)

Does this MultiMap contain the Collection as any of its value collections.

Parameters
value the collection to check for
Returns
  • true if the value is contained in any of the mapped collections

public void copyTo (Collection<V> collection)

Copy all values to the supplied collection.

Parameters
collection to copy all the values to.

public boolean putSingle (K key, V value)

Put a single value in to the appropriate mapped collection.

Parameters
key the Key
value the single value to add to the collection for this key
Returns
  • whether the Collection was modified.

public int sizeAll ()

The sum of sizes of all contained keys. May be different to calling size() on the result of allValues()

Returns
  • the total number of elements in all mapped collections.