jds.sort
Class MergeSort

java.lang.Object
  |
  +--jds.sort.MergeSort

public class MergeSort
extends java.lang.Object
implements SortAlgorithm

MergeSort - implementation of the merge sort algorithm; for use with book Classic Data Structures in Java by Timothy A Budd, published by Addison-Wesley, 2001.

See Also:
Indexed

Constructor Summary
MergeSort(java.util.Comparator t)
          initialize the Merge Sort algorithm
 
Method Summary
 void sort(Indexed v)
          rearrange collection into asending order
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MergeSort

public MergeSort(java.util.Comparator t)
initialize the Merge Sort algorithm
Parameters:
t - the Comparator used to place values in sequence
Method Detail

sort

public void sort(Indexed v)
rearrange collection into asending order
Specified by:
sort in interface SortAlgorithm
Parameters:
data - the values to be ordered