common
Class HashMapWithPreimages

java.lang.Object
  extended by java.util.AbstractMap
      extended by common.AbstractMapWithPreimages
          extended by common.HashMapWithPreimages
All Implemented Interfaces:
MapWithPreimages, java.lang.Cloneable, java.util.Map

public class HashMapWithPreimages
extends AbstractMapWithPreimages
implements java.lang.Cloneable

Implementation of MapWithPreimages that builds on a hash map from keys to values, augmenting it with a hash map from values to sets (preimages). This implementation does not support null keys or values.


Nested Class Summary
 
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.MapWithPreimages
MapWithPreimages.EmptyMapWithPreimages
 
Nested classes/interfaces inherited from interface java.util.Map
java.util.Map.Entry<K,V>
 
Field Summary
 
Fields inherited from class common.AbstractMapWithPreimages
map, preimages
 
Fields inherited from interface common.MapWithPreimages
EMPTY_MAP_WITH_PREIMAGES
 
Constructor Summary
HashMapWithPreimages()
          Creates an empty map.
HashMapWithPreimages(java.util.Map orig)
          Creates a HashMapWithPreimages with the same mappings as the specified map.
 
Method Summary
 java.lang.Object clone()
           
 
Methods inherited from class common.AbstractMapWithPreimages
clear, containsKey, containsValue, entrySet, get, getPreimage, getPreimages, isCorefPair, isEmpty, keySet, numCorefPairs, put, remove, size, values, valueSet
 
Methods inherited from class java.util.AbstractMap
equals, hashCode, putAll, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
equals, hashCode, putAll
 

Constructor Detail

HashMapWithPreimages

public HashMapWithPreimages()
Creates an empty map.


HashMapWithPreimages

public HashMapWithPreimages(java.util.Map orig)
Creates a HashMapWithPreimages with the same mappings as the specified map.

Method Detail

clone

public java.lang.Object clone()
Overrides:
clone in class java.util.AbstractMap