net.cscott.jutil
Class AggregateSetFactory<V>
java.lang.Object
net.cscott.jutil.CollectionFactory<V>
net.cscott.jutil.SetFactory<V>
net.cscott.jutil.AggregateSetFactory<V>
- All Implemented Interfaces:
- Serializable
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.6 2006-10-30 20:14:41 cananian Exp $
- Author:
- C. Scott Ananian
- See Also:
- Serialized Form
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AggregateSetFactory
public AggregateSetFactory()
- Creates an
AggregateSetFactory.
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.
- Specified by:
makeSet in class SetFactory<V>
Copyright (c) 2006 C. Scott Ananian