Package com.sodius.oslc.core.util
Class MultivaluedMaps
java.lang.Object
com.sodius.oslc.core.util.MultivaluedMaps
Enables creating instances of
MultivaluedMap.- Since:
- 3.0.0
-
Method Summary
Modifier and TypeMethodDescriptionstatic final <K,V> MultivaluedMap <K, V> create()Deprecated.static final <V> MultivaluedMap<String, V> Creates an instance ofMultivaluedMapwhere keys are non case sensitive Strings.static final <K,V> MultivaluedMap <K, V> empty()Creates an unmodifiable empty instance.static final <K,V> MultivaluedMap <K, V> unmodifiableMap(MultivaluedMap<K, V> originalMap) Creates an unmodifiable instance for the given map.
-
Method Details
-
create
@Deprecated(since="4.0.0", forRemoval=false) public static final <K,V> MultivaluedMap<K,V> create()Deprecated.replace calls bynew MultivaluedHashMap<>()Creates an instance ofMultivaluedMap. This method is strictly equivalent to instantiatingMultivaluedHashMap.- Type Parameters:
K- the type of keys maintained by this map.V- the type of mapped values.- Returns:
- a new map instance.
-
createCaseInsensitive
Creates an instance ofMultivaluedMapwhere 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
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
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
-
new MultivaluedHashMap<>()