Class MultivaluedMaps

java.lang.Object
com.sodius.oslc.core.util.MultivaluedMaps

public final class MultivaluedMaps extends Object
Enables creating instances of MultivaluedMap.
Since:
3.0.0
  • Method Details

    • create

      @Deprecated(since="4.0.0", forRemoval=false) public static final <K, V> MultivaluedMap<K,V> create()
      Deprecated.
      replace calls by new MultivaluedHashMap<>()
      Creates an instance of MultivaluedMap. This method is strictly equivalent to instantiating MultivaluedHashMap.
      Type Parameters:
      K - the type of keys maintained by this map.
      V - the type of mapped values.
      Returns:
      a new map instance.
    • createCaseInsensitive

      public static final <V> MultivaluedMap<String,V> createCaseInsensitive()
      Creates an instance of MultivaluedMap where keys are non case sensitive Strings. This method is notably useful for a map of HTTP headers, which are not case sensitive.
      Type Parameters:
      V - the type of mapped values.
      Returns:
      a new map instance.
    • empty

      public static final <K, V> MultivaluedMap<K,V> empty()
      Creates an unmodifiable empty instance.
      Type Parameters:
      K - the type of the key entries.
      V - the type of the mapped values.
      Returns:
      the empty instance.
      Since:
      4.0.0
    • unmodifiableMap

      public static final <K, V> MultivaluedMap<K,V> unmodifiableMap(MultivaluedMap<K,V> originalMap)
      Creates an unmodifiable instance for the given map.
      Type Parameters:
      K - the type of the key entries.
      V - the type of the mapped values.
      Parameters:
      originalMap - the original map.
      Returns:
      the corresponding instance.
      Since:
      4.0.0