    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.

##

Sorter()

##

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

##

Sorter

     public Sorter()

##

sortStringKeys

     public static Vector sortStringKeys(Hashtable h)

  Get the keys of this hashtable, sorted.

  Parameters:
    h - The hashtable whose String keys are wanted.

sortStringEnumeration

     public static Vector sortStringEnumeration(Enumeration enum)

  Sort the given String enumeration.

  Returns:
    A sorted vector of String.

sortObjectKeys

     public static Vector sortObjectKeys(Hashtable h)

  Get the keys of this hashtable, sorted.

  Parameters:
    h - The hashtable whose keys.toString() are wanted.

sortObjectEnumeration

     public static Vector sortObjectEnumeration(Enumeration enum)

  Sort the given enumeration whose elements have .toString() method.

  Returns:
    A sorted vector of the original objects.

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