edu.ull.cgunay.utils
Class ComparableSortedSet

java.lang.Object
  |
  +--java.util.AbstractCollection
        |
        +--java.util.AbstractSet
              |
              +--java.util.TreeSet
                    |
                    +--edu.ull.cgunay.utils.ComparableSortedSet
All Implemented Interfaces:
Cloneable, Collection, Comparable, Serializable, Set, SortedSet

public class ComparableSortedSet
extends TreeSet
implements Comparable

Allows comparing instances of these sets according to alphabetical comparison technique, assuming elements implement the Comparable interface.

Created: Fri Oct 18 17:30:21 2002

Modified: $Date: 2003/03/13 21:17:04 $

Version:
$Revision: 1.3 $ for this file.
Author:
Cengiz Gunay
See Also:
Comparable, Serialized Form

Field Summary
 
Fields inherited from class java.util.TreeSet
 
Constructor Summary
ComparableSortedSet()
           
ComparableSortedSet(Collection set)
           
ComparableSortedSet(Comparator c)
           
ComparableSortedSet(SortedSet set)
           
 
Method Summary
 int compareTo(Object thatSet)
          Compares both sets.
 
Methods inherited from class java.util.TreeSet
add, addAll, clear, clone, comparator, contains, first, headSet, isEmpty, iterator, last, remove, size, subSet, tailSet
 
Methods inherited from class java.util.AbstractSet
equals, hashCode, removeAll
 
Methods inherited from class java.util.AbstractCollection
containsAll, retainAll, toArray, toArray, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Set
containsAll, equals, hashCode, removeAll, retainAll, toArray, toArray
 

Constructor Detail

ComparableSortedSet

public ComparableSortedSet()

ComparableSortedSet

public ComparableSortedSet(SortedSet set)

ComparableSortedSet

public ComparableSortedSet(Collection set)

ComparableSortedSet

public ComparableSortedSet(Comparator c)
Method Detail

compareTo

public int compareTo(Object thatSet)
Compares both sets.

Specified by:
compareTo in interface Comparable
Parameters:
thatSet - set to compare
Returns:
-1,0,1 according to this being less, equal, or greater to that