Class MultivaluedMapImpl<K,​V>

  • Type Parameters:
    K -
    V -
    All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, java.util.Map<K,​java.util.List<V>>, javax.ws.rs.core.MultivaluedMap<K,​V>

    @Deprecated
    public class MultivaluedMapImpl<K,​V>
    extends java.util.HashMap<K,​java.util.List<V>>
    implements javax.ws.rs.core.MultivaluedMap<K,​V>
    Deprecated.
    Will be removed in next minor release.
    Implementation of the JAX-RS interface MultivaluedMap.
    See Also:
    Serialized Form
    • Nested Class Summary

      • Nested classes/interfaces inherited from class java.util.AbstractMap

        java.util.AbstractMap.SimpleEntry<K extends java.lang.Object,​V extends java.lang.Object>, java.util.AbstractMap.SimpleImmutableEntry<K extends java.lang.Object,​V extends java.lang.Object>
      • 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
      private static long serialVersionUID
      Deprecated.
       
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      void add​(K key, V value)
      Deprecated.
      Add a value to the current list of values for the supplied key.
      MultivaluedMapImpl<K,​V> clone()
      Deprecated.
      Creates a clone of this map.
      V getFirst​(K key)
      Deprecated.
      A shortcut to get the first value of the supplied key.
      V getLast​(K key)
      Deprecated.
      A shortcut to get the last value of the supplied key.
      void putSingle​(K key, V value)
      Deprecated.
      Set the key's value to be a one item list consisting of the supplied value.
      • Methods inherited from class java.util.HashMap

        clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
      • Methods inherited from class java.util.AbstractMap

        equals, hashCode, toString
      • Methods inherited from class java.lang.Object

        finalize, getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface java.util.Map

        clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
    • Field Detail

      • serialVersionUID

        private static final long serialVersionUID
        Deprecated.
        See Also:
        Constant Field Values
    • Constructor Detail

      • MultivaluedMapImpl

        public MultivaluedMapImpl()
        Deprecated.
        Creates a new empty MultivaluedMapImpl
      • MultivaluedMapImpl

        public MultivaluedMapImpl​(javax.ws.rs.core.MultivaluedMap<K,​V> old)
        Deprecated.
        Creates a copy of the given MultivaluedMap.
        Parameters:
        old - the MultivaluedMap to copy. The values are not cloned.
    • Method Detail

      • add

        public void add​(K key,
                        V value)
        Deprecated.
        Add a value to the current list of values for the supplied key.
        Specified by:
        add in interface javax.ws.rs.core.MultivaluedMap<K,​V>
        Parameters:
        key - the key
        value - the value to be added.
        See Also:
        MultivaluedMap.add(Object, Object)
      • clone

        public MultivaluedMapImpl<K,​V> clone()
        Deprecated.
        Creates a clone of this map. The contained values are not cloned.
        Overrides:
        clone in class java.util.HashMap<K,​java.util.List<V>>
        Returns:
        A copy of this map
      • getFirst

        public V getFirst​(K key)
        Deprecated.
        A shortcut to get the first value of the supplied key.
        Specified by:
        getFirst in interface javax.ws.rs.core.MultivaluedMap<K,​V>
        Parameters:
        key - the key
        Returns:
        the first value for the specified key or null if the key is not in the map.
        See Also:
        MultivaluedMap.getFirst(Object)
      • getLast

        public V getLast​(K key)
        Deprecated.
        A shortcut to get the last value of the supplied key.
        Parameters:
        key - the key
        Returns:
        the last value for the specified key or null if the key is not in the map.
      • putSingle

        public void putSingle​(K key,
                              V value)
        Deprecated.
        Set the key's value to be a one item list consisting of the supplied value. Any existing values will be replaced.
        Specified by:
        putSingle in interface javax.ws.rs.core.MultivaluedMap<K,​V>
        Parameters:
        key - the key
        value - the single value of the key
        See Also:
        MultivaluedMap.putSingle(Object, Object)