jds.sort
Class BubbleSort

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

public class BubbleSort
extends java.lang.Object
implements SortAlgorithm

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

See Also:
Indexed, Comparator

Constructor Summary
BubbleSort(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

BubbleSort

public BubbleSort(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