net.cscott.jutil

Class AggregateSetFactory<V>

public class AggregateSetFactory<V> extends SetFactory<V> implements Serializable

AggregateSetFactory uses a single HashMap as backing store for the many smaller Sets created by this SetFactory. This means that we use much less space and rehash less frequently than if we were using the standard Factories.hashSetFactory.

Version: $Id: AggregateSetFactory.java,v 1.3 2004/01/13 20:47:05 cananian Exp $

Author: C. Scott Ananian

Constructor Summary
AggregateSetFactory()
Creates an AggregateSetFactory.
Method Summary
Set<V>makeSet(Collection<? extends V> c)
Generates a new mutable Set which is a subset of the backing set of this AggregateSetFactory.

Constructor Detail

AggregateSetFactory

public AggregateSetFactory()
Creates an AggregateSetFactory.

Method Detail

makeSet

public Set<V> makeSet(Collection<? extends V> c)
Generates a new mutable Set which is a subset of the backing set of this AggregateSetFactory. WARNING: The remove() method of the returned Set is very slow.
Copyright © 2003 C. Scott Ananian