aQute.lib.collections
Class MultiMap<K,V>
java.lang.Object
java.util.AbstractMap<K,V>
java.util.HashMap<K,List<V>>
aQute.lib.collections.MultiMap<K,V>
- All Implemented Interfaces:
- Serializable, Cloneable, Map<K,List<V>>
public class MultiMap<K,V>
- extends HashMap<K,List<V>>
- implements Map<K,List<V>>
- See Also:
- Serialized Form
| Nested classes/interfaces inherited from interface java.util.Map |
Map.Entry<K,V> |
| Methods inherited from class java.util.HashMap |
clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, size, values |
| Methods inherited from interface java.util.Map |
clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, values |
MultiMap
public MultiMap()
MultiMap
public MultiMap(Class<K> keyClass,
Class<V> valueClass,
boolean noduplicates)
MultiMap
public MultiMap(Map<K,List<V>> other)
MultiMap
public MultiMap(MultiMap<K,V> other)
add
public boolean add(K key,
V value)
addAll
public boolean addAll(K key,
Collection<? extends V> value)
remove
public boolean remove(K key,
V value)
removeAll
public boolean removeAll(K key,
Collection<V> value)
iterate
public Iterator<V> iterate(K key)
all
public Iterator<V> all()
flatten
public Map<K,V> flatten()
transpose
public MultiMap<V,K> transpose()
allValues
public List<V> allValues()
- Return a collection with all values
- Returns:
Copyright © 2014 aQute SARL. All rights reserved.