    All Packages  Class Hierarchy  This Package  Previous  Next  Index

# Class org.w3c.tools.sorter.Sorter

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

public class Sorter
extends Object

This class implements a bunch of different ways of sorting things.

##

Sorter()

##

sortComparableArray(Comparable[], boolean)
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.

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.

sortComparableArray

     public static Comparable[] sortComparableArray(Comparable array[],
                                                    boolean inplace)

    All Packages  Class Hierarchy  This Package  Previous  Next  Index