com.sun.jersey.core.util
Class StringKeyIgnoreCaseMultivaluedMap<V>
java.lang.Object
java.util.AbstractMap<K,V>
com.sun.jersey.core.util.KeyComparatorHashMap<K,V>
com.sun.jersey.core.util.KeyComparatorLinkedHashMap<String,List<V>>
com.sun.jersey.core.util.StringKeyIgnoreCaseMultivaluedMap<V>
- Type Parameters:
V
- the type of values.
- All Implemented Interfaces:
- Serializable, Cloneable, Map<String,List<V>>, MultivaluedMap<String,V>
- Direct Known Subclasses:
- StringKeyObjectValueIgnoreCaseMultivaluedMap, StringKeyStringValueIgnoreCaseMultivaluedMap
public class StringKeyIgnoreCaseMultivaluedMap<V>
- extends KeyComparatorLinkedHashMap<String,List<V>>
- implements MultivaluedMap<String,V>
An implementation of MultivaluedMap
where keys are instances of
String and are compared ignoring case.
- Author:
- Paul.Sandoz@Sun.Com
- See Also:
- Serialized Form
Nested classes/interfaces inherited from interface java.util.Map |
Map.Entry<K,V> |
Method Summary |
void |
add(String key,
V value)
Add a value to the current list of values for the supplied key. |
V |
getFirst(String key)
A shortcut to get the first value of the supplied key. |
protected List<V> |
getList(String key)
|
void |
putSingle(String key,
V value)
Set the key's value to be a one item list consisting of the supplied value. |
Methods inherited from interface java.util.Map |
clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, values |
StringKeyIgnoreCaseMultivaluedMap
public StringKeyIgnoreCaseMultivaluedMap()
StringKeyIgnoreCaseMultivaluedMap
public StringKeyIgnoreCaseMultivaluedMap(StringKeyIgnoreCaseMultivaluedMap<V> that)
putSingle
public void putSingle(String key,
V value)
- Description copied from interface:
MultivaluedMap
- 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 MultivaluedMap<String,V>
- Parameters:
key
- the keyvalue
- the single value of the key
add
public void add(String key,
V value)
- Description copied from interface:
MultivaluedMap
- Add a value to the current list of values for the supplied key.
- Specified by:
add
in interface MultivaluedMap<String,V>
- Parameters:
key
- the keyvalue
- the value to be added.
getFirst
public V getFirst(String key)
- Description copied from interface:
MultivaluedMap
- A shortcut to get the first value of the supplied key.
- Specified by:
getFirst
in interface MultivaluedMap<String,V>
- Parameters:
key
- the key
- Returns:
- the first value for the specified key or null if the key is
not in the map.
getList
protected List<V> getList(String key)
Copyright © 2013 Oracle Corporation. All Rights Reserved.