org.mortbay.util
Class MultiMap<T>

java.lang.Object
  extended by org.mortbay.util.MultiMap<T>

public class MultiMap<T>
extends Object

A multi valued Map. Simple I2P replacement for org.eclipse.jetty.util.MultiMap so we don't depend on Jetty utils. Contains only the methods required by MultiPartRequest. Does not implement Map. Unsynchronized.

Since:
0.9.12

Constructor Summary
MultiMap(int capacity)
           
 
Method Summary
 void add(T key, Object value)
           
 Object get(T key)
          This returns the first item or null.
 List<Object> getValues(T key)
           
 Set<T> keySet()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MultiMap

public MultiMap(int capacity)
Method Detail

keySet

public Set<T> keySet()

get

public Object get(T key)
This returns the first item or null. The Jetty version appears to return the item if only one, or the entire list if more than one. Only used by MultiPartRequest.contains() which is unused. contains() would fail with a ClassCastException if we returned a list here, which is a bug in MultiPartRequest?


getValues

public List<Object> getValues(T key)

add

public void add(T key,
                Object value)