public class PersistentMapFactory<K,V> extends MapFactory<K,V>
PersistentMapFactory uses hash-consing to ensure that
the Maps created by it maximally reuse space.
Equality tests between Maps created by this factory are
constant-time. Cloning a Map created by this factory is
also constant-time. The implementation is based on persistent
randomized treaps.| Constructor and Description |
|---|
PersistentMapFactory(java.util.Comparator<K> comparator)
Creates a
PersistentMapFactory. |
| Modifier and Type | Method and Description |
|---|---|
java.util.Map<K,V> |
makeMap(java.util.Map<? extends K,? extends V> mm)
Generates a new unsynchronized mutable
Map which
is based on persistent randomized treaps. |
makeMappublic PersistentMapFactory(java.util.Comparator<K> comparator)
PersistentMapFactory. Note that the keys
must implement a good hashcode as well as being comparable.public java.util.Map<K,V> makeMap(java.util.Map<? extends K,? extends V> mm)
Map which
is based on persistent randomized treaps. All Maps
created by this factory maximally reuse space, and have very
fast comparison operations.makeMap in class MapFactory<K,V>Copyright (c) 2006 C. Scott Ananian