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
| Fields inherited from class java.util.TreeSet |
|
| Methods inherited from class java.util.TreeSet |
add, addAll, clear, clone, comparator, contains, first, headSet, isEmpty, iterator, last, remove, size, subSet, tailSet |
ComparableSortedSet
public ComparableSortedSet()
ComparableSortedSet
public ComparableSortedSet(SortedSet set)
ComparableSortedSet
public ComparableSortedSet(Collection set)
ComparableSortedSet
public ComparableSortedSet(Comparator c)
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