common
Class IndexedHashMultiMap
java.lang.Object
java.util.AbstractMap
common.HashMultiMap
common.IndexedHashMultiMap
- All Implemented Interfaces:
- IndexedMultiMap, MultiMap, java.lang.Cloneable, java.util.Map
public class IndexedHashMultiMap
- extends HashMultiMap
- implements IndexedMultiMap
Implementation of the IndexedMultiMap interface.
| Nested classes/interfaces inherited from class java.util.AbstractMap |
java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V> |
| Nested classes/interfaces inherited from interface java.util.Map |
java.util.Map.Entry<K,V> |
|
Method Summary |
protected java.util.Set |
copySet(java.util.Set orig)
|
protected java.util.Set |
emptySet()
|
java.lang.Object |
get(java.lang.Object key)
Returns the set associated with the given key. |
protected java.util.Set |
newSet()
|
| Methods inherited from class common.HashMultiMap |
add, addAll, clear, clone, containsKey, containsValue, entrySet, equals, hashCode, keySet, put, remove, remove, removeAll, size |
| Methods inherited from class java.util.AbstractMap |
isEmpty, putAll, toString, values |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.Map |
clear, containsKey, containsValue, entrySet, equals, hashCode, isEmpty, keySet, putAll, remove, size, values |
IndexedHashMultiMap
public IndexedHashMultiMap()
- Creates a new, empty IndexedMultiMap.
IndexedHashMultiMap
public IndexedHashMultiMap(IndexedMultiMap orig)
- Creates a new IndexedMultiMap that is initially equal to the
given IndexedMultiMap.
get
public java.lang.Object get(java.lang.Object key)
- Description copied from interface:
MultiMap
- Returns the set associated with the given key. If the key is not
in the map, returns an empty set. The set returned is modifiable and
backed by this multi-map: if values are added for the given key,
they will show up in the returned set. However, the returned set may
lose its connection to this multi-map if the multi-map's
put method is called or if all the values for the
given key are removed.
- Specified by:
get in interface MultiMap- Specified by:
get in interface java.util.Map- Overrides:
get in class HashMultiMap
emptySet
protected java.util.Set emptySet()
- Overrides:
emptySet in class HashMultiMap
newSet
protected java.util.Set newSet()
- Overrides:
newSet in class HashMultiMap
copySet
protected java.util.Set copySet(java.util.Set orig)
- Overrides:
copySet in class HashMultiMap