jds.sort
Class InsertionSort

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

public class InsertionSort
extends java.lang.Object
implements SortAlgorithm

InsertionSort - implementation of the insertion 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
InsertionSort(java.util.Comparator t)
          initialize the Bubble 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

InsertionSort

public InsertionSort(java.util.Comparator t)
initialize the Bubble 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