Class Multimap<K,V>
- java.lang.Object
-
- com.brightcove.player.util.collection.Multimap<K,V>
-
- Type Parameters:
K
- Key typeV
- Values type
public class Multimap<K,V> extends java.lang.Object
Structure that handles singleKey-multipleValues map.
-
-
Method Detail
-
get
@NonNull public java.util.List<V> get(K key)
- 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
public void put(K key, V value)
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.
-
-