harpoon.Util.Collections
Class SetFactory

java.lang.Object
  |
  +--harpoon.Util.Collections.CollectionFactory
        |
        +--harpoon.Util.Collections.SetFactory
Direct Known Subclasses:
AggregateSetFactory, BitSetFactory

public abstract class SetFactory
extends CollectionFactory

SetFactory is a Set generator. Subclasses should implement constructions of specific types of Sets.

Version:
$Id: SetFactory.java,v 1.2 2002/02/25 21:09:15 cananian Exp $
Author:
Felix S. Klock II <pnkfelix@mit.edu>

Constructor Summary
SetFactory()
          Creates a SetFactory.
 
Method Summary
 Collection makeCollection(Collection c)
          Generates a new, mutable Collection, using the elements of c as a template for its initial contents.
 Collection makeCollection(int initCapacity)
          Generates a new, mutable, empty Collection, using initialCapacity as a hint to use for the capacity for the produced Collection.
 Set makeSet()
          Generates a new, mutable, empty Set.
abstract  Set makeSet(Collection c)
          Generates a new mutable Set, using the elements of c as a template for its initial contents.
 Set makeSet(int initialCapacity)
          Generates a new, mutable, empty Set, using initialCapacity as a hint to use for the capacity for the produced Set.
 
Methods inherited from class harpoon.Util.Collections.CollectionFactory
makeCollection
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SetFactory

public SetFactory()
Creates a SetFactory.

Method Detail

makeCollection

public final Collection makeCollection(Collection c)
Description copied from class: CollectionFactory
Generates a new, mutable Collection, using the elements of c as a template for its initial contents. Note that the Collection returned is not a view of c, but rather a snapshot; changes to c are not reflected in the returned Collection.

Specified by:
makeCollection in class CollectionFactory

makeCollection

public final Collection makeCollection(int initCapacity)
Description copied from class: CollectionFactory
Generates a new, mutable, empty Collection, using initialCapacity as a hint to use for the capacity for the produced Collection.

Overrides:
makeCollection in class CollectionFactory

makeSet

public final Set makeSet()
Generates a new, mutable, empty Set.


makeSet

public Set makeSet(int initialCapacity)
Generates a new, mutable, empty Set, using initialCapacity as a hint to use for the capacity for the produced Set.


makeSet

public abstract Set makeSet(Collection c)
Generates a new mutable Set, using the elements of c as a template for its initial contents.