JUtil

net.cscott.jutil
Class PersistentMultiMapFactory<K,V>

java.lang.Object
  extended by net.cscott.jutil.MapFactory<K,V>
      extended by net.cscott.jutil.MultiMapFactory<K,V>
          extended by net.cscott.jutil.PersistentMultiMapFactory<K,V>

public class PersistentMultiMapFactory<K,V>
extends MultiMapFactory<K,V>

A 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.

Version:
$Id: PersistentMultiMapFactory.java,v 1.5 2006-10-30 19:58:06 cananian Exp $
Author:
C. Scott Ananian

Constructor Summary
PersistentMultiMapFactory(Comparator<K> keyComparator, Comparator<V> valueComparator)
          Creates a PersistentMultiMapFactory.
 
Method Summary
 MultiMap<K,V> makeMultiMap()
          Generates a new unsynchronized mutable MultiMap which is based on persistent randomized treaps.
 
Methods inherited from class net.cscott.jutil.MultiMapFactory
makeMap, makeMap, makeMultiMap
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PersistentMultiMapFactory

public PersistentMultiMapFactory(Comparator<K> keyComparator,
                                 Comparator<V> valueComparator)
Creates a PersistentMultiMapFactory.

Method Detail

makeMultiMap

public MultiMap<K,V> makeMultiMap()
Generates a new unsynchronized mutable MultiMap which is based on persistent randomized treaps. All MultiMaps created by this factory maximally reuse space, and have very fast comparison operations.

Overrides:
makeMultiMap in class MultiMapFactory<K,V>

JUtil

Copyright (c) 2006 C. Scott Ananian