JUtil

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

java.lang.Object
  extended by net.cscott.jutil.MapFactory<K,V>
      extended by net.cscott.jutil.AggregateMapFactory<K,V>
All Implemented Interfaces:
Serializable

public class AggregateMapFactory<K,V>
extends MapFactory<K,V>
implements Serializable

AggregateMapFactory uses a single HashMap as backing store for the many smaller Maps created by this MapFactory. This means that we use much less space and rehash less frequently than if we were using the standard Factories.hashMapFactory(). The iterators of the submaps are fast, unlike those of HashMap.

Version:
$Id: AggregateMapFactory.java,v 1.6 2006-10-30 19:58:05 cananian Exp $
Author:
C. Scott Ananian
See Also:
Serialized Form

Constructor Summary
AggregateMapFactory()
          Creates an AggregateMapFactory.
 
Method Summary
 Map<K,V> makeMap(Map<? extends K,? extends V> mm)
          Generates a new mutable Map which is a subset of the backing set of this AggregateMapFactory.
 
Methods inherited from class net.cscott.jutil.MapFactory
makeMap
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AggregateMapFactory

public AggregateMapFactory()
Creates an AggregateMapFactory.

Method Detail

makeMap

public Map<K,V> makeMap(Map<? extends K,? extends V> mm)
Generates a new mutable Map which is a subset of the backing set of this AggregateMapFactory.

Specified by:
makeMap in class MapFactory<K,V>

JUtil

Copyright (c) 2006 C. Scott Ananian