All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class w3c.tools.sorter.Sorter

java.lang.Object
   |
   +----w3c.tools.sorter.Sorter

public class Sorter
extends Object
This class implements a bunch of different ways of sorting things.


Constructor Index

 o Sorter()

Method Index

 o sortObjectEnumeration(Enumeration)
Sort the given enumeration whose elements have .toString() method.
 o sortObjectKeys(Hashtable)
Get the keys of this hashtable, sorted.
 o sortStringArray(String[], boolean)
Sort the given String array in place.
 o sortStringEnumeration(Enumeration)
Sort the given String enumeration.
 o sortStringKeys(Hashtable)
Get the keys of this hashtable, sorted.

Constructors

 o Sorter
 public Sorter()

Methods

 o sortStringKeys
 public static Vector sortStringKeys(Hashtable h)
Get the keys of this hashtable, sorted.

Parameters:
h - The hashtable whose String keys are wanted.
 o sortStringEnumeration
 public static Vector sortStringEnumeration(Enumeration enum)
Sort the given String enumeration.

Returns:
A sorted vector of String.
 o sortObjectKeys
 public static Vector sortObjectKeys(Hashtable h)
Get the keys of this hashtable, sorted.

Parameters:
h - The hashtable whose keys.toString() are wanted.
 o sortObjectEnumeration
 public static Vector sortObjectEnumeration(Enumeration enum)
Sort the given enumeration whose elements have .toString() method.

Returns:
A sorted vector of the original objects.
 o sortStringArray
 public static String[] sortStringArray(String array[],
                                        boolean inplace)
Sort the given String array in place.

Parameters:
array - The array of String to sort.
inplace - Sort the array in place if true, allocate a fresh array for the result otherwise.
Returns:
The same array, with string sorted.

All Packages  Class Hierarchy  This Package  Previous  Next  Index