| java.lang.Object org.w3c.tools.sorter.Sorter
Sorter | public class Sorter (Code) | | This class implements a bunch of different ways of sorting things.
|
Method Summary | |
static void | orderedComparableInsert(Comparable key, Vector into) Insert a Comparable into a vector, maintaing the order. | public static void | orderedFileInsert(File file, Vector into) Insert a File into a vector, maintaing the order:
Directory then files in alphabetical order. | static void | orderedStringInsert(String key, Vector into) Insert a String into a vector, maintaing the order. | static void | quickSortCompArray(Comparable array, int lo0, int hi0) Quick sort the given chunk of the array in place. | static void | quickSortStringArray(String array, int lo0, int hi0) Quick sort the given chunk of the array in place. | public static Comparable[] | sortComparableArray(Comparable array, boolean inplace) | public static Vector | sortComparableEnumeration(Enumeration e) Sort the given Comparable enumeration. | public static Vector | sortComparableKeys(Hashtable h) Get the keys of this hashtable, sorted. | public static String[] | sortStringArray(String array, boolean inplace) Sort the given String array in place.
Parameters: array - The array of String to sort. Parameters: inplace - Sort the array in place if true, allocate a fresh array for the result otherwise. | public static Vector | sortStringEnumeration(Enumeration e) Sort the given String enumeration. | public static Vector | sortStringKeys(Hashtable h) Get the keys of this hashtable, sorted. |
orderedComparableInsert | static void orderedComparableInsert(Comparable key, Vector into)(Code) | | Insert a Comparable into a vector, maintaing the order.
Parameters: key - The string to insert. Parameters: into - The target sorted vector. |
orderedFileInsert | public static void orderedFileInsert(File file, Vector into)(Code) | | Insert a File into a vector, maintaing the order:
Directory then files in alphabetical order.
Parameters: file - The File used to sort. Parameters: into - The target sorted vector. |
orderedStringInsert | static void orderedStringInsert(String key, Vector into)(Code) | | Insert a String into a vector, maintaing the order.
Parameters: key - The string to insert. Parameters: into - The target sorted vector. |
quickSortCompArray | static void quickSortCompArray(Comparable array, int lo0, int hi0)(Code) | | Quick sort the given chunk of the array in place.
Parameters: array - The array to sort. Parameters: lo0 - The low bound of the chunk of the array to sort. Parameters: hi0 - The high bound of the array to sort. |
quickSortStringArray | static void quickSortStringArray(String array, int lo0, int hi0)(Code) | | Quick sort the given chunk of the array in place.
Parameters: array - The array to sort. Parameters: lo0 - The low bound of the chunk of the array to sort. Parameters: hi0 - The high bound of the array to sort. |
sortComparableEnumeration | public static Vector sortComparableEnumeration(Enumeration e)(Code) | | Sort the given Comparable enumeration.
A sorted vector of Comparable instance. |
sortComparableKeys | public static Vector sortComparableKeys(Hashtable h)(Code) | | Get the keys of this hashtable, sorted.
Parameters: h - The hashtable whose Comparable keys are wanted. |
sortStringArray | public static String[] sortStringArray(String array, boolean inplace)(Code) | | Sort the given String array in place.
Parameters: array - The array of String to sort. Parameters: inplace - Sort the array in place if true, allocate a fresh array for the result otherwise. The same array, with string sorted. |
sortStringEnumeration | public static Vector sortStringEnumeration(Enumeration e)(Code) | | Sort the given String enumeration.
A sorted vector of String. |
sortStringKeys | public static Vector sortStringKeys(Hashtable h)(Code) | | Get the keys of this hashtable, sorted.
Parameters: h - The hashtable whose String keys are wanted. |
|
|