Package soot.util
Class HashMultiMap<K,V>
- java.lang.Object
-
- soot.util.AbstractMultiMap<K,V>
-
- soot.util.HashMultiMap<K,V>
-
- All Implemented Interfaces:
Serializable,Iterable<heros.solver.Pair<K,V>>,MultiMap<K,V>
- Direct Known Subclasses:
IdentityHashMultiMap,SHashMultiMap
public class HashMultiMap<K,V> extends AbstractMultiMap<K,V>
A map with sets as values, HashMap implementation.- Author:
- Ondrej Lhotak
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description HashMultiMap()HashMultiMap(int initialSize)HashMultiMap(int initialSize, float loadFactor)HashMultiMap(Map<K,Collection<V>> m)HashMultiMap(MultiMap<K,V> m)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()booleancontainsKey(Object key)booleancontainsValue(V value)protected Map<K,Set<V>>createMap()protected Map<K,Set<V>>createMap(int initialSize)booleanequals(Object o)Set<V>get(K o)inthashCode()Set<K>keySet()protected Set<V>newSet()intnumKeys()booleanput(K key, V value)booleanputAll(K key, Collection<V> values)booleanremove(K key)booleanremove(K key, V value)booleanremoveAll(K key, Collection<V> values)intsize()Gets the number of keys in this MultiMapStringtoString()Set<V>values()-
Methods inherited from class soot.util.AbstractMultiMap
contains, isEmpty, iterator, putAll, putAll, putMap
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Method Detail
-
numKeys
public int numKeys()
-
containsKey
public boolean containsKey(Object key)
-
containsValue
public boolean containsValue(V value)
-
putAll
public boolean putAll(K key, Collection<V> values)
-
remove
public boolean remove(K key)
-
removeAll
public boolean removeAll(K key, Collection<V> values)
-
size
public int size()
Description copied from interface:MultiMapGets the number of keys in this MultiMap- Returns:
- The number of keys in this MultiMap
-
clear
public void clear()
-
-