02/28/2005
 

com.epicentric.common
Class QuickSorter

java.lang.Object
  |
  +--com.epicentric.common.QuickSorter
All Implemented Interfaces:
GenericSorter

Deprecated. As of 4.0, to be removed in 8.0 or later. Replaced by java.util.Collections

public final class QuickSorter
extends Object
implements GenericSorter

Data set sorter that uses the quicksort algorithm.


Field Summary
static int ASCENDING
          Deprecated. Ascending order sort type
static int DESCENDING
          Deprecated. Descending order sort type
 
Constructor Summary
QuickSorter()
          Deprecated.  
 
Method Summary
static Vector arrayToVector(Object[] array)
          Deprecated. Returns the elements of an object array as a vector (convenience method).
static Vector enumerationToVector(Enumeration enumeration)
          Deprecated. Returns the elements of an enumeration as a vector (convenience method).
 Vector getSortedItems(Enumeration items, com.sun.java.util.collections.Comparator comparator)
          Deprecated. As of 4.0, to be removed in 8.0 or later. Replaced by java.util.Collections.sort()
 Vector getSortedItems(Enumeration items, com.sun.java.util.collections.Comparator comparator, int sortType)
          Deprecated. As of 4.0, to be removed in 8.0 or later. Replaced by java.util.Collections.sort()
 Vector getSortedItems(Object[] items, com.sun.java.util.collections.Comparator comparator)
          Deprecated. As of 4.0, to be removed in 8.0 or later. Replaced by java.util.Collections.sort()
 Vector getSortedItems(Object[] items, com.sun.java.util.collections.Comparator comparator, int sortType)
          Deprecated. As of 4.0, to be removed in 8.0 or later. Replaced by java.util.Collections.sort()
 Vector getSortedItems(Vector items, com.sun.java.util.collections.Comparator comparator)
          Deprecated. As of 4.0, to be removed in 8.0 or later. Replaced by java.util.Collections.sort()
 Vector getSortedItems(Vector items, com.sun.java.util.collections.Comparator comparator, int sortType)
          Deprecated. As of 4.0, to be removed in 8.0 or later. Replaced by java.util.Collections.sort()
static Vector reverse(Vector vector)
          Deprecated. Reverses the order of sorted items.
static Object[] vectorToArray(Vector vector)
          Deprecated. Returns the elements of a vector as an object array (convenience method).
static Enumeration vectorToEnumeration(Vector vector)
          Deprecated. Returns the elements of a vector as an enumeration (convenience method).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ASCENDING

public static final int ASCENDING
Deprecated. 
Ascending order sort type

DESCENDING

public static final int DESCENDING
Deprecated. 
Descending order sort type
Constructor Detail

QuickSorter

public QuickSorter()
Deprecated. 
Method Detail

getSortedItems

public Vector getSortedItems(Vector items,
                             com.sun.java.util.collections.Comparator comparator)
Deprecated. As of 4.0, to be removed in 8.0 or later. Replaced by java.util.Collections.sort()

Sorts a vector using the default sort type (ascending order).
Specified by:
getSortedItems in interface GenericSorter
Parameters:
items - vector of objects to be sorted
comparator - comparison object to be used for sorting
Returns:
vector containing the sorted objects
See Also:
List, List.addAll(java.util.Collection), Collections.sort(java.util.List, java.util.Comparator)

getSortedItems

public Vector getSortedItems(Vector items,
                             com.sun.java.util.collections.Comparator comparator,
                             int sortType)
Deprecated. As of 4.0, to be removed in 8.0 or later. Replaced by java.util.Collections.sort()

Sorts a vector using the specified sort type.
Specified by:
getSortedItems in interface GenericSorter
Parameters:
items - vector of objects to be sorted
comparator - comparison object to be used for sorting
sortType - ASCENDING or DESCENDING
Returns:
vector containing the sorted objects
See Also:
List, List.addAll(java.util.Collection), Collections.sort(java.util.List, java.util.Comparator)

getSortedItems

public Vector getSortedItems(Enumeration items,
                             com.sun.java.util.collections.Comparator comparator)
Deprecated. As of 4.0, to be removed in 8.0 or later. Replaced by java.util.Collections.sort()

Sorts an enumeration using the default sort type (ascending order).
Parameters:
items - enumeration of objects to be sorted
comparator - comparison object to be used for sorting
Returns:
vector containing the sorted objects
See Also:
List, List.addAll(java.util.Collection), Collections.sort(java.util.List, java.util.Comparator)

getSortedItems

public Vector getSortedItems(Enumeration items,
                             com.sun.java.util.collections.Comparator comparator,
                             int sortType)
Deprecated. As of 4.0, to be removed in 8.0 or later. Replaced by java.util.Collections.sort()

Sorts an enumeration using the specified sort type.
Parameters:
items - enumeration of objects to be sorted
comparator - comparison object to be used for sorting
sortType - ASCENDING or DESCENDING
Returns:
vector containing the sorted objects
See Also:
List, List.addAll(java.util.Collection), Collections.sort(java.util.List, java.util.Comparator)

getSortedItems

public Vector getSortedItems(Object[] items,
                             com.sun.java.util.collections.Comparator comparator)
Deprecated. As of 4.0, to be removed in 8.0 or later. Replaced by java.util.Collections.sort()

Sorts an object array using the default sort type (ascending order).
Parameters:
items - array of objects to be sorted
comparator - comparison object to be used for sorting
Returns:
vector containing the sorted objects
See Also:
List, List.addAll(java.util.Collection), Collections.sort(java.util.List, java.util.Comparator)

getSortedItems

public Vector getSortedItems(Object[] items,
                             com.sun.java.util.collections.Comparator comparator,
                             int sortType)
Deprecated. As of 4.0, to be removed in 8.0 or later. Replaced by java.util.Collections.sort()

Sorts an object array using the specified sort type.
Parameters:
items - array of objects to be sorted
comparator - comparison object to be used for sorting
sortType - ASCENDING or DESCENDING
Returns:
vector containing the sorted objects
See Also:
List, List.addAll(java.util.Collection), Collections.sort(java.util.List, java.util.Comparator)

reverse

public static Vector reverse(Vector vector)
Deprecated. 
Reverses the order of sorted items.
Parameters:
vector - input vector of sorted items
Returns:
vector of objects in reverse sort order

vectorToArray

public static Object[] vectorToArray(Vector vector)
Deprecated. 
Returns the elements of a vector as an object array (convenience method).
Parameters:
vector - input vector
Returns:
array of objects, or null if vector is null or empty

arrayToVector

public static Vector arrayToVector(Object[] array)
Deprecated. 
Returns the elements of an object array as a vector (convenience method).
Parameters:
array - input object array
Returns:
vector, or null if array is null or empty

enumerationToVector

public static Vector enumerationToVector(Enumeration enumeration)
Deprecated. 
Returns the elements of an enumeration as a vector (convenience method).
Parameters:
enumeration - input enumeration
Returns:
vector, or an empty vector if enumeration is null or empty

vectorToEnumeration

public static Enumeration vectorToEnumeration(Vector vector)
Deprecated. 
Returns the elements of a vector as an enumeration (convenience method).
Parameters:
vector - input vector
Returns:
enumeration, or null if vector is null

02/28/2005
 

Copyright and Trademark Notices