org.semanticdesktop.aperture.util
Class ListMap<K,V>
java.lang.Object
org.semanticdesktop.aperture.util.ListMap<K,V>
public class ListMap<K,V>
- extends Object
A Map like structure where each key maps to a list of values.
I couldn't get the generics to work the way I wanted, so it doesn't inherit anything.
TODO: move this to a utils project.
- Author:
- grimnes, sauermann
ListMap
public ListMap()
put
public V put(K key,
V value)
get
public List<V> get(K key)
- Get all values registered for key K.
- Parameters:
key
- the key
- Returns:
null
or a list
containsKey
public boolean containsKey(K key)
toString
public String toString()
- Overrides:
toString
in class Object
remove
public void remove(K key)
entrySet
public Set<Map.Entry<K,V>> entrySet()
- Returns a Set copy of the mappings contained in this map.
- Returns:
- a copy of the listmap as set of entries
Copyright © 2010 Aperture Development Team. All Rights Reserved.