jpaul.DataStructs
Class SetFacts.COWSetFactory<E>

java.lang.Object
  extended by jpaul.DataStructs.SetFactory<T>
      extended by jpaul.DataStructs.SetFacts.COWSetFactory<E>
All Implemented Interfaces:
java.io.Serializable, CollectionFactory<E>, Factory<java.util.Set<E>>
Enclosing class:
SetFacts

Deprecated. As of jpaul 2.2, use SetFacts.cow(SetFactory) instead.

@Deprecated
public static class SetFacts.COWSetFactory<E>
extends SetFactory<T>

COWSetFactory generates "copy-on-write" (COW) sets.

See Also:
Serialized Form

Constructor Summary
SetFacts.COWSetFactory(SetFactory<E> underSetFact)
          Deprecated. Creates a COWSetFactory.
 
Method Summary
 java.util.Set<T> create()
          Create a new object of class T.
 java.util.Set<T> newColl(java.util.Collection<T> coll)
          Default implementation: uses create() to create an empty set, and next adds all elements from coll to the newly-created set.
 
Methods inherited from class jpaul.DataStructs.SetFactory
create, newColl
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SetFacts.COWSetFactory

public SetFacts.COWSetFactory(SetFactory<E> underSetFact)
Deprecated. 
Creates a COWSetFactory.

Parameters:
underSetFact - Set factory for generating the sets used in the representation of the COW sets generated by this COWSetFactory.
Method Detail

create

public java.util.Set<T> create()
Description copied from interface: Factory
Create a new object of class T. Corresponds to a default constructor.


newColl

public java.util.Set<T> newColl(java.util.Collection<T> coll)
Description copied from class: SetFactory
Default implementation: uses create() to create an empty set, and next adds all elements from coll to the newly-created set.

Specified by:
newColl in interface CollectionFactory<T>
Overrides:
newColl in class SetFactory<T>
See Also:
Factory.create(Object)


Copyright 2005 Alexandru Salcianu - salcianu@alum.mit.edu