com.partnersoft.data
Interface SortingAlgorithm

All Known Implementing Classes:
QuickSort, SelectionSort

public interface SortingAlgorithm

An interface for generic array (indexed item, not necessarily an actual Java array object) sorting algorithms.

To use, select an implementation of this, and an instance of SortingGopher, and then sort away.

The less-than-hardcore should look at SortingLib since it has convenience functions that make it things much easier.

Copyright 2000-2006 Partner Software, Inc.

Author:
Paul Reavis

Method Summary
 void sort(SortingGopher gopher)
          Sorts using the given SortingGopher.
 void sort(SortingGopher gopher, int start, int end)
          Sorts using the given SortingGopher over the given range (start <= i < end).
 

Method Detail

sort

void sort(SortingGopher gopher)
Sorts using the given SortingGopher.

Parameters:
gopher - SortingGopher adapter for underlying array-like structure.

sort

void sort(SortingGopher gopher,
          int start,
          int end)
Sorts using the given SortingGopher over the given range (start <= i < end).

Parameters:
gopher - SortingGopher adapter for underlying array-like structure.
start - starting index (0 is minimum) for sort region (inclusive)
end - ending index for sort region (exclusive)