jpaul.DataStructs
Class SetFacts.TreeSetFactory<E>

java.lang.Object
  extended by jpaul.DataStructs.SetFactory<E>
      extended by jpaul.DataStructs.SetFacts.TreeSetFactory<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.tree(Comparator) instead.

public static class SetFacts.TreeSetFactory<E>
extends SetFactory<E>

TreeSetFactory is a set factory that generates TreeSets. TreeSets are great for applications that use many small sets.

See Also:
Serialized Form

Constructor Summary
SetFacts.TreeSetFactory(java.util.Comparator<E> comp)
          Deprecated. Creates a TreeSetFactory.
 
Method Summary
 java.util.Set<E> create()
          Deprecated. Create a new object of class T.
 java.util.Set<E> newColl(java.util.Collection<E> c)
          Deprecated. 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.TreeSetFactory

public SetFacts.TreeSetFactory(java.util.Comparator<E> comp)
Deprecated. 
Creates a TreeSetFactory.

Parameters:
comp - Comparator used internally by the generated TreeSets.
Method Detail

create

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


newColl

public java.util.Set<E> newColl(java.util.Collection<E> c)
Deprecated. 
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<E>
Overrides:
newColl in class SetFactory<E>
See Also:
Factory.create(Object)


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