|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--harpoon.Util.Collections.CollectionFactory | +--harpoon.Util.Collections.SetFactory
SetFactory
is a Set
generator.
Subclasses should implement constructions of specific types of
Set
s.
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 |
public SetFactory()
SetFactory
.
Method Detail |
public final Collection makeCollection(Collection c)
CollectionFactory
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
.
makeCollection
in class CollectionFactory
public final Collection makeCollection(int initCapacity)
CollectionFactory
Collection
, using
initialCapacity
as a hint to use for the capacity
for the produced Collection
.
makeCollection
in class CollectionFactory
public final Set makeSet()
Set
.
public Set makeSet(int initialCapacity)
Set
, using
initialCapacity
as a hint to use for the capacity
for the produced Set
.
public abstract Set makeSet(Collection c)
Set
, using the elements
of c
as a template for its initial contents.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |