org.trialox.jaxrs.util
Class MultivaluedMapImpl<K,V>

java.lang.Object
  extended by java.util.AbstractMap<K,V>
      extended by java.util.HashMap<K,java.util.List<V>>
          extended by org.trialox.jaxrs.util.MultivaluedMapImpl<K,V>
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.util.Map<K,java.util.List<V>>, javax.ws.rs.core.MultivaluedMap<K,V>
Direct Known Subclasses:
CaseInsensitiveMap

public class MultivaluedMapImpl<K,V>
extends java.util.HashMap<K,java.util.List<V>>
implements javax.ws.rs.core.MultivaluedMap<K,V>

implementation from jersey of the MultiValuedMap

Author:
szalay
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.util.AbstractMap
java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>
 
Nested classes/interfaces inherited from interface java.util.Map
java.util.Map.Entry<K,V>
 
Constructor Summary
MultivaluedMapImpl()
           
 
Method Summary
 void add(K key, V value)
           
 void addFirst(K key, V value)
           
<A> java.util.List<A>
get(K key, java.lang.Class<A> type)
           
 V getFirst(K key)
           
<A> A
getFirst(K key, A defaultValue)
           
<A> A
getFirst(K key, java.lang.Class<A> type)
           
 void putSingle(K key, V value)
           
 
Methods inherited from class java.util.HashMap
clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, size, values
 
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, values
 

Constructor Detail

MultivaluedMapImpl

public MultivaluedMapImpl()
Method Detail

putSingle

public final void putSingle(K key,
                            V value)
Specified by:
putSingle in interface javax.ws.rs.core.MultivaluedMap<K,V>

add

public final void add(K key,
                      V value)
Specified by:
add in interface javax.ws.rs.core.MultivaluedMap<K,V>

getFirst

public final V getFirst(K key)
Specified by:
getFirst in interface javax.ws.rs.core.MultivaluedMap<K,V>

addFirst

public final void addFirst(K key,
                           V value)

get

public final <A> java.util.List<A> get(K key,
                                       java.lang.Class<A> type)

getFirst

public final <A> A getFirst(K key,
                            java.lang.Class<A> type)

getFirst

public final <A> A getFirst(K key,
                            A defaultValue)


Copyright © 2008. All Rights Reserved.