net.cscott.jutil

Class PersistentMapFactory<K,V>

public class PersistentMapFactory<K,V> extends MapFactory<K,V>

A PersistentMapFactory uses hash-consing to ensure that the PersistentMaps created by it maximally reuse space. Equality tests between Maps created by this factory are also fast.

Version: $Id: PersistentMapFactory.java,v 1.3 2004/01/14 18:44:01 cananian Exp $

Author: C. Scott Ananian

Constructor Summary
PersistentMapFactory(Comparator<K> comparator)
Creates a PersistentMapFactory.
Method Summary
Map<K,V>makeMap(Map<? extends K,? extends V> mm)
Generates a new unsynchronized mutable Map which is based on persistent randomized treaps.

Constructor Detail

PersistentMapFactory

public PersistentMapFactory(Comparator<K> comparator)
Creates a PersistentMapFactory.

Method Detail

makeMap

public Map<K,V> makeMap(Map<? extends K,? extends V> mm)
Generates a new unsynchronized mutable Map which is based on persistent randomized treaps. All Maps created by this factory maximally reuse space, and have very fast comparison operations.
Copyright © 2003 C. Scott Ananian