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.


Constructor Index

 o Sort()

Method Index

 o bubbleSort(int[])
Sort the given integer array using the bubble-sort algorithm.
 o bubbleSort(String[])
Sort the given string array using the bubble-sort algorithm.
 o main(String[])
 o quickSort(int[], int, int)
Sort the given integer array using the quick-sort algorithm.
 o quickSort(String[], int, int)
Sort the given string array using the quick-sort algorithm.
 o quickSort(Vector)
Sort the given vector using the quick-sort algorithm.
 o randomize(int[])
 o results(int[])
 o results(String[])

Constructors

 o Sort
 public Sort()

Methods

 o 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.
 o 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,
 o 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,
 o bubbleSort
 public static int[] bubbleSort(int data[])
Sort the given integer array using the bubble-sort algorithm.

Parameters:
data - the integer array to sort
 o bubbleSort
 public static String[] bubbleSort(String data[])
Sort the given string array using the bubble-sort algorithm.

Parameters:
data - the string array to sort
 o randomize
 private static int[] randomize(int data[])
 o results
 private static void results(int data[])
 o results
 private static void results(String data[])
 o main
 public static void main(String args[])

All Packages  Class Hierarchy  This Package  Previous  Next  Index