Package com.sodius.oslc.core.util
Class MultivaluedMaps
- java.lang.Object
-
- com.sodius.oslc.core.util.MultivaluedMaps
-
public final class MultivaluedMaps extends Object
Enables creating instances ofMultivaluedMap
.JAX-RS 2.x provides ready to use implementation classes at specification level (e.g.
javax.ws.rs.core.MultivaluedHashMap
. JAX-RS 1.x was only defining the interface, with classes being provided by specific implementations. This class enables obtaining map instances when either JAX-RS 1.x or 2.x is used, without relying on a specific implementation.- Since:
- 3.0.0
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <K,V>
MultivaluedMap<K,V>create()
Creates an instance ofjavax.ws.rs.core.MultivaluedMap
.static <V> MultivaluedMap<String,V>
createCaseInsensitive()
Creates an instance ofjavax.ws.rs.core.MultivaluedMap
where keys are non case sensitive Strings.
-
-
-
Method Detail
-
create
public static final <K,V> MultivaluedMap<K,V> create()
Creates an instance ofjavax.ws.rs.core.MultivaluedMap
.- 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 ofjavax.ws.rs.core.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.
-
-