| java.lang.Object sunlabs.brazil.util.Sort
Sort | public class Sort (Code) | | Placeholder for useful sorting utilities.
Sort a vector of Strings
author: Stephen Uhler (stephen.uhler@sun.com) author: Colin Stevens (colin.stevens@sun.com) version: 1.5, 99/10/14 |
Inner Class :public interface Compare | |
Method Summary | |
public static void | qsort(Vector strings) Sort a vector of strings using the Qsort algorithm. | public static void | qsort(Object array) Sorts an array of the basic types (ints, floats, bytes, etc.) or
Strings. | public static void | qsort(Object array, Compare compare) Sorts an array. |
qsort | public static void qsort(Vector strings)(Code) | | Sort a vector of strings using the Qsort algorithm.
The compareTo method of the String class is used for comparison
|
qsort | public static void qsort(Object array) throws IllegalArgumentException(Code) | | Sorts an array of the basic types (ints, floats, bytes, etc.) or
Strings. The sort is in increasing order, and is case-sensitive
for strings. Sorting an array of booleans or an array of objects
other than Strings is not supported.
Parameters: array - The array to sort in place. throws: IllegalArgumentException - if array is not an array of the types listedabove. |
qsort | public static void qsort(Object array, Compare compare) throws IllegalArgumentException(Code) | | Sorts an array. The specified comparator is used to control the
sorting order. Arrays of any type may be sorted, depending upon
what the comparator accepts.
Parameters: array - The array to sort in place. Parameters: compare - The comparator for sort order. throws: IllegalArgumentException - if array is not an array. |
|
|