public class PersistentMultiMapFactory<K,V> extends MultiMapFactory<K,V>
PersistentMultiMapFactory uses hash-consing to ensure that
the MultiMaps created by it maximally reuse space.
Equality tests between MultiMaps created by this factory are
constant-time. Cloning a MultiMap created by this factory is
also constant-time. The generated MultiMaps are
Maps of (Persistent)Sets, not Maps of
generalized Collections (ie, no duplicate <key,value>
mappings are allowed). The implementation is based on persistent
randomized treaps.| Constructor and Description |
|---|
PersistentMultiMapFactory(java.util.Comparator<K> keyComparator,
java.util.Comparator<V> valueComparator)
Creates a
PersistentMultiMapFactory. |
| Modifier and Type | Method and Description |
|---|---|
MultiMap<K,V> |
makeMultiMap()
Generates a new unsynchronized mutable
MultiMap which
is based on persistent randomized treaps. |
makeMap, makeMap, makeMultiMappublic PersistentMultiMapFactory(java.util.Comparator<K> keyComparator, java.util.Comparator<V> valueComparator)
PersistentMultiMapFactory.public MultiMap<K,V> makeMultiMap()
MultiMap which
is based on persistent randomized treaps. All MultiMaps
created by this factory maximally reuse space, and have very
fast comparison operations.makeMultiMap in class MultiMapFactory<K,V>Copyright (c) 2006 C. Scott Ananian