java.lang.Object
org.sejda.commons.collection.ListValueMap<K,V>
- Type Parameters:
K- key generic typeV- value generic type
Map where the elements added to the same key are enqueued in a List.
- Author:
- Andrea Vacondio
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
ListValueMap
public ListValueMap()
-
-
Method Details
-
clear
public void clear()Removes all the elements form the map -
put
Adds the input value to theListassociated to the input key- Parameters:
key-value-- Returns:
- the List with the input value added
-
remove
Removes the input value from theListassociated to the input key.- Parameters:
key-value-- Returns:
- true if the value was found and removed.
-
get
A null safe getter for the given key.- Parameters:
key-- Returns:
- the list associated to the input key or an empty list of nothing is associated.
-
size
public int size()- Returns:
- number of values stored by this map
-