public class MultivaluedMapImpl extends java.util.HashMap<java.lang.String,java.util.List<java.lang.String>> implements MultivaluedMap<java.lang.String,java.lang.String>
MultivaluedMap
where keys and values are
instances of String.Constructor and Description |
---|
MultivaluedMapImpl() |
MultivaluedMapImpl(MultivaluedMap<java.lang.String,java.lang.String> that) |
Modifier and Type | Method and Description |
---|---|
void |
add(java.lang.String key,
java.lang.Object value) |
void |
add(java.lang.String key,
java.lang.String value)
Add a value to the current list of values for the supplied key.
|
void |
addFirst(java.lang.String key,
java.lang.String value) |
<A> java.util.List<A> |
get(java.lang.String key,
java.lang.Class<A> type) |
java.lang.String |
getFirst(java.lang.String key)
A shortcut to get the first value of the supplied key.
|
<A> A |
getFirst(java.lang.String key,
A defaultValue) |
<A> A |
getFirst(java.lang.String key,
java.lang.Class<A> type) |
void |
putSingle(java.lang.String key,
java.lang.Object value) |
void |
putSingle(java.lang.String key,
java.lang.String value)
Set the key's value to be a one item list consisting of the supplied value.
|
clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, size, values
public MultivaluedMapImpl()
public MultivaluedMapImpl(MultivaluedMap<java.lang.String,java.lang.String> that)
public final void putSingle(java.lang.String key, java.lang.String value)
MultivaluedMap
putSingle
in interface MultivaluedMap<java.lang.String,java.lang.String>
key
- the keyvalue
- the single value of the keypublic final void add(java.lang.String key, java.lang.String value)
MultivaluedMap
add
in interface MultivaluedMap<java.lang.String,java.lang.String>
key
- the keyvalue
- the value to be added.public final java.lang.String getFirst(java.lang.String key)
MultivaluedMap
getFirst
in interface MultivaluedMap<java.lang.String,java.lang.String>
key
- the keypublic final void addFirst(java.lang.String key, java.lang.String value)
public final <A> java.util.List<A> get(java.lang.String key, java.lang.Class<A> type)
public final void putSingle(java.lang.String key, java.lang.Object value)
public final void add(java.lang.String key, java.lang.Object value)
public final <A> A getFirst(java.lang.String key, java.lang.Class<A> type)
public final <A> A getFirst(java.lang.String key, A defaultValue)
Copyright © 2016 Oracle Corporation. All Rights Reserved.