Class Multimap<K,V>
java.lang.Object
com.brightcove.player.util.collection.Multimap<K,V>
- Type Parameters:
K
- Key typeV
- Values type
Structure that handles singleKey-multipleValues map.
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
Multimap
public Multimap()
-
-
Method Details
-
get
- Parameters:
key
- of the values to be retrieved- Returns:
- A list of values for the given key. If no values are found, an empty list is returned
-
put
Add the value to the map.- Parameters:
key
- of the value.value
- to be added.
-
size
public int size()- Returns:
- the size of all the values in the map. If n values have the same key, then n is added to the size.
-
isEmpty
public boolean isEmpty()- Returns:
- Whether the map is empty.
-