com.partnersoft.data
Class ArrayQuickSort
java.lang.Object
com.partnersoft.data.ArrayQuickSort
- All Implemented Interfaces:
- ArraySortingAlgorithm
public class ArrayQuickSort
- extends java.lang.Object
- implements ArraySortingAlgorithm
A generic quicksort. Based on chapter 9 of Algorithms, by Robert Sedgewick,
1988 ISBN 0-201-06673-4. Uses pluggable ArraySortingGophers to allow sorting
of any list of data.
- Author:
- Paul Reavis Copyright 2000 Partner Software, Inc.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ArrayQuickSort
public ArrayQuickSort()
singleton
public static ArrayQuickSort singleton()
sort
public final void sort(ArraySortingGopher gopher)
- Just do it.
- Specified by:
sort in interface ArraySortingAlgorithm
sort
public final void sort(ArraySortingGopher gopher,
int start,
int end)
- Description copied from interface:
ArraySortingAlgorithm
- Does the job using the given gopher over the given range.
- Specified by:
sort in interface ArraySortingAlgorithm