Package net.cscott.jutil
Class PersistentMapFactory<K,V>
java.lang.Object
net.cscott.jutil.PersistentMapFactory<K,V>
- All Implemented Interfaces:
MapFactory<K,V>
A
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.- Since:
- 1.1
- Author:
- C. Scott Ananian <cananian@alumni.princeton.edu>
-
Constructor Summary
ConstructorsConstructorDescriptionPersistentMapFactory(Comparator<K> comparator) Creates aPersistentMapFactory. -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.cscott.jutil.MapFactory
makeMap
-
Constructor Details
-
PersistentMapFactory
Creates aPersistentMapFactory. Note that the keys must implement a good hashcode as well as being comparable.
-
-
Method Details