org.w3c.tools.sorter
Class Sorter
java.lang.Object
|
+--org.w3c.tools.sorter.Sorter
- public class Sorter
- extends java.lang.Object
This class implements a bunch of different ways of sorting things.
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Sorter
public Sorter()
sortStringKeys
public static java.util.Vector sortStringKeys(java.util.Hashtable h)
- Get the keys of this hashtable, sorted.
- Parameters:
h
- The hashtable whose String keys are wanted.
sortStringEnumeration
public static java.util.Vector sortStringEnumeration(java.util.Enumeration enum)
- Sort the given String enumeration.
- Returns:
- A sorted vector of String.
sortComparableKeys
public static java.util.Vector sortComparableKeys(java.util.Hashtable h)
- Get the keys of this hashtable, sorted.
- Parameters:
h
- The hashtable whose Comparable keys are wanted.
sortComparableEnumeration
public static java.util.Vector sortComparableEnumeration(java.util.Enumeration enum)
- Sort the given Comparable enumeration.
- Returns:
- A sorted vector of Comparable instance.
sortStringArray
public static java.lang.String[] sortStringArray(java.lang.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)