Interface MultivaluedMap<K,V>

All Superinterfaces:
Map<K,List<V>>

public interface MultivaluedMap<K,V> extends Map<K,List<V>>
A map of key-values pairs. Each key can have zero or more values.
  • Method Details

    • putSingle

      void putSingle(K key, V value)
      Set the key's value to be a one item list consisting of the supplied value. Any existing values will be replaced.
      Parameters:
      key - the key
      value - the single value of the key
    • add

      void add(K key, V value)
      Add a value to the current list of values for the supplied key.
      Parameters:
      key - the key
      value - the value to be added.
    • getFirst

      V getFirst(K key)
      A shortcut to get the first value of the supplied key.
      Parameters:
      key - the key
      Returns:
      the first value for the specified key or null if the key is not in the map.