org.apache.turbine.util
Class QuickSort

java.lang.Object
  |
  +--org.apache.turbine.util.QuickSort

public class QuickSort
extends java.lang.Object

QuickSort - adapted from Doug Lea's Public Domain collection library.

Version:
$Id: QuickSort.java,v 1.1.1.1 2001/08/16 05:09:40 jvanzyl Exp $
Author:
Dave Bryson

Constructor Summary
QuickSort()
           
 
Method Summary
static void quickSort(java.lang.Object[] s, int lo, int hi, Comparable cmp)
          Sort array of Objects using the QuickSort algorithm.
 void sort(java.lang.Object[] data, Comparable cmp)
          Sorts and array of objects.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QuickSort

public QuickSort()
Method Detail

quickSort

public static void quickSort(java.lang.Object[] s,
                             int lo,
                             int hi,
                             Comparable cmp)
Sort array of Objects using the QuickSort algorithm.
Parameters:
s - An Object[].
lo - The current lower bound.
hi - The current upper bound.
cmp - A Comparable to compare two elements.

sort

public void sort(java.lang.Object[] data,
                 Comparable cmp)
Sorts and array of objects.
Parameters:
data - An Object[].
cmp - A Comparable to compare two elements.


Copyright © 2000-2002 Apache Software Foundation. All Rights Reserved.