common
Class IndexedMultiMapDiff

java.lang.Object
  extended by java.util.AbstractMap
      extended by common.HashMultiMapDiff
          extended by common.IndexedMultiMapDiff
All Implemented Interfaces:
IndexedMultiMap, MultiMap, MultiMapDiff, java.lang.Cloneable, java.util.Map

public class IndexedMultiMapDiff
extends HashMultiMapDiff
implements IndexedMultiMap

A MultiMapDiff implementation that also implements the IndexedMultiMap interface. It is just like HashMultiMapDiff, except that it uses IndexedHashSetDiff objects rather than ordinary HashSetDiff objects.


Nested Class Summary
protected  class IndexedMultiMapDiff.IndexedValueSet
           
 
Nested classes/interfaces inherited from class common.HashMultiMapDiff
HashMultiMapDiff.ValueSet
 
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 common.IndexedMultiMap
IndexedMultiMap.EmptyIndexedMultiMap
 
Nested classes/interfaces inherited from interface common.MultiMap
MultiMap.EmptyMultiMap
 
Nested classes/interfaces inherited from interface java.util.Map
java.util.Map.Entry<K,V>
 
Field Summary
 
Fields inherited from interface common.IndexedMultiMap
EMPTY_INDEXED_MULTI_MAP
 
Fields inherited from interface common.MultiMap
EMPTY_MULTI_MAP
 
Constructor Summary
IndexedMultiMapDiff(IndexedMultiMap underlying)
          Creates a new IndexedMultiMapDiff with the given underlying IndexedMultiMap.
 
Method Summary
protected  java.util.Set emptySet()
           
 java.lang.Object get(java.lang.Object key)
          Returns the set associated with the given key.
protected  SetDiff newDiff(java.util.Set orig)
           
 
Methods inherited from class common.HashMultiMapDiff
add, addAll, changeUnderlying, clear, clearChanges, clone, containsKey, entrySet, getAddedValues, getChangedKeys, getCurrent, getRemovedValues, put, remove, remove, removeAll, size
 
Methods inherited from class java.util.AbstractMap
containsValue, equals, hashCode, isEmpty, keySet, putAll, toString, values
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface common.MultiMap
add, addAll, put, remove, removeAll
 
Methods inherited from interface java.util.Map
clear, containsKey, containsValue, entrySet, equals, hashCode, isEmpty, keySet, putAll, remove, size, values
 

Constructor Detail

IndexedMultiMapDiff

public IndexedMultiMapDiff(IndexedMultiMap underlying)
Creates a new IndexedMultiMapDiff with the given underlying IndexedMultiMap.

Method Detail

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 HashMultiMapDiff

emptySet

protected java.util.Set emptySet()
Overrides:
emptySet in class HashMultiMapDiff

newDiff

protected SetDiff newDiff(java.util.Set orig)
Overrides:
newDiff in class HashMultiMapDiff