Class MultiValueMap<K,V>

java.lang.Object
java.util.AbstractMap<K,List<V>>
java.util.HashMap<K,List<V>>
dev.prozilla.pine.common.util.MultiValueMap<K,V>
Type Parameters:
K - The type of keys in this map
V - The type of values in this map
All Implemented Interfaces:
Serializable, Cloneable, Map<K,List<V>>

public class MultiValueMap<K,V> extends HashMap<K,List<V>>
Implementation of a hash map which supports multiple values per key.
See Also:
  • Constructor Details

    • MultiValueMap

      public MultiValueMap()
  • Method Details

    • getFirst

      public V getFirst(K key)
    • getLast

      public V getLast(K key)
    • get

      public V get(K key, int index)
    • add

      public List<V> add(K key, V value)
    • addAll

      public List<V> addAll(K key, Collection<? extends V> newValues)
    • removeValue

      public V removeValue(K key, V value)
    • set

      public List<V> set(K key)
    • set

      public List<V> set(K key, V value)
    • set

      public List<V> set(K key, Collection<? extends V> values)
    • setIfAbsent

      public List<V> setIfAbsent(K key, V value)
    • flatValues

      public List<V> flatValues()
    • valueSize

      public int valueSize(K key) throws IllegalArgumentException
      Throws:
      IllegalArgumentException