All Packages Class Hierarchy This Package Previous Next Index
Class com.netobjects.nfx.util.Sort
java.lang.Object
|
+----com.netobjects.nfx.util.Sort
- public class Sort
- extends Object
Contains several sort methods.
-
Sort()
-
-
bubbleSort(int[])
-
Sort the given integer array using the bubble-sort algorithm.
-
bubbleSort(String[])
-
Sort the given string array using the bubble-sort algorithm.
-
main(String[])
-
-
quickSort(int[], int, int)
-
Sort the given integer array using the quick-sort algorithm.
-
quickSort(String[], int, int)
-
Sort the given string array using the quick-sort algorithm.
-
quickSort(Vector)
-
Sort the given vector using the quick-sort algorithm.
-
randomize(int[])
-
-
results(int[])
-
-
results(String[])
-
Sort
public Sort()
quickSort
public static Vector quickSort(Vector data)
- Sort the given vector using the quick-sort algorithm. It coppies
references into an array and calls another quick-sort method.
- Parameters:
- data - the vector to sort.
quickSort
public static int[] quickSort(int data[],
int left,
int right)
- Sort the given integer array using the quick-sort algorithm.
- Parameters:
- data - the integer array to sort
- left - the start index.
- right - the end index,
quickSort
public static String[] quickSort(String data[],
int left,
int right)
- Sort the given string array using the quick-sort algorithm.
- Parameters:
- data - the string array to sort
- left - the start index.
- right - the end index,
bubbleSort
public static int[] bubbleSort(int data[])
- Sort the given integer array using the bubble-sort algorithm.
- Parameters:
- data - the integer array to sort
bubbleSort
public static String[] bubbleSort(String data[])
- Sort the given string array using the bubble-sort algorithm.
- Parameters:
- data - the string array to sort
randomize
private static int[] randomize(int data[])
results
private static void results(int data[])
results
private static void results(String data[])
main
public static void main(String args[])
All Packages Class Hierarchy This Package Previous Next Index