Package net.cscott.jutil
Class AggregateSetFactory<V>
java.lang.Object
net.cscott.jutil.AggregateSetFactory<V>
- All Implemented Interfaces:
Serializable,CollectionFactory<V>,SetFactory<V>
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().- Author:
- C. Scott Ananian <cananian@alumni.princeton.edu>
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionmakeSet(Collection<? extends V> c) Generates a new mutableSetwhich is a subset of the backing set of thisAggregateSetFactory.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.cscott.jutil.SetFactory
makeCollection, makeCollection, makeCollection, makeSet, makeSet
-
Constructor Details
-
AggregateSetFactory
public AggregateSetFactory()Creates anAggregateSetFactory.
-
-
Method Details
-
makeSet
Generates a new mutableSetwhich is a subset of the backing set of thisAggregateSetFactory. WARNING: Theremove()method of the returnedSetis very slow.- Specified by:
makeSetin interfaceSetFactory<V>
-