ahc.collection
Interface MultiMap

All Superinterfaces:
Map, java.util.Map
All Known Implementing Classes:
GenericMultiMap

public interface MultiMap
extends Map

A MultiMap is a Map that allows several values to be stored for one key.

Calling get(Object key) returns a List with all objects that were previously put for the key. Calling getAll(key) goes a step further and guarantees that list to be non-null, i.e. an empty list is returned if no value was put vor the key.

Author:
Arno Haase

Method Summary
 List getAll(java.lang.Object key)
           
 int getCount(java.lang.Object key)
           
 void putAll(MultiMap m)
           
 boolean remove(java.lang.Object key, java.lang.Object value)
           
 
Methods inherited from interface ahc.collection.Map
entries, getValueEqualityStrategy, keys, vals
 
Methods inherited from interface java.util.Map
clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, values
 

Method Detail

getCount

public int getCount(java.lang.Object key)

getAll

public List getAll(java.lang.Object key)

remove

public boolean remove(java.lang.Object key,
                      java.lang.Object value)

putAll

public void putAll(MultiMap m)