net.cscott.jutil
Class PersistentMultiMapFactory<K,V>
java.lang.Object
net.cscott.jutil.MapFactory<K,V>
net.cscott.jutil.MultiMapFactory<K,V>
net.cscott.jutil.PersistentMultiMapFactory<K,V>
public class PersistentMultiMapFactory<K,V>
- extends MultiMapFactory<K,V>
A PersistentMultiMapFactory
uses hash-consing to ensure that
the MultiMap
s created by it maximally reuse space.
Equality tests between MultiMap
s created by this factory are
constant-time. Cloning a MultiMap
created by this factory is
also constant-time. The generated MultiMap
s are
Map
s of (Persistent)Set
s, not Map
s of
generalized Collection
s (ie, no duplicate <key,value>
mappings are allowed). The implementation is based on persistent
randomized treaps.
- Version:
- $Id: PersistentMultiMapFactory.java,v 1.5 2006-10-30 19:58:06 cananian Exp $
- Author:
- C. Scott Ananian
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PersistentMultiMapFactory
public PersistentMultiMapFactory(Comparator<K> keyComparator,
Comparator<V> valueComparator)
- Creates a
PersistentMultiMapFactory
.
makeMultiMap
public MultiMap<K,V> makeMultiMap()
- Generates a new unsynchronized mutable
MultiMap
which
is based on persistent randomized treaps. All MultiMap
s
created by this factory maximally reuse space, and have very
fast comparison operations.
- Overrides:
makeMultiMap
in class MultiMapFactory<K,V>
Copyright (c) 2006 C. Scott Ananian