Class MultivaluedMapContext<K,​V>

  • All Implemented Interfaces:
    java.util.Map<K,​java.util.List<V>>, LocalizedMap<java.util.List<V>>

    public class MultivaluedMapContext<K,​V>
    extends MapContext<K,​java.util.List<V>>
    MultivaluedMap Context A MapContext which handles multiple values for the same key.
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface java.util.Map

        java.util.Map.Entry<K extends java.lang.Object,​V extends java.lang.Object>
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String module  
    • Constructor Summary

      Constructors 
      Constructor Description
      MultivaluedMapContext()
      Create a multi-value map initialized with one context
    • Field Detail

      • module

        public static final java.lang.String module
    • Constructor Detail

      • MultivaluedMapContext

        public MultivaluedMapContext()
        Create a multi-value map initialized with one context
    • Method Detail

      • putSingle

        public void putSingle​(K key,
                              V value)
        Associate key with the single value value. If other values are already associated with key then override them.
        Parameters:
        key - the key to associate value with
        value - the value to add to the context
      • add

        public void add​(K key,
                        V value)
        Associate key with the single value value. If other values are already associated with key, then add value to them.
        Parameters:
        key - the key to associate value with
        value - the value to add to the context
      • getFirst

        public V getFirst​(java.lang.Object key)
        Get the first value contained in the list of values associated with key.
        Parameters:
        key - a candidate key
        Returns:
        the first value associated with key or null if no value is associated with it.