edu.vt.middleware.dictionary.sort
Class BubbleSort

java.lang.Object
  extended by edu.vt.middleware.dictionary.sort.BubbleSort
All Implemented Interfaces:
ArraySorter

public class BubbleSort
extends java.lang.Object
implements ArraySorter

Provides an implementation of the bubble sort algorithm.

Version:
$Revision: 1252 $ $Date: 2010-04-16 17:24:23 -0400 (Fri, 16 Apr 2010) $
Author:
Middleware Services

Constructor Summary
BubbleSort()
           
 
Method Summary
 void sort(java.lang.String[] array)
          This will sort the supplied string array.
 void sort(java.lang.String[] array, java.util.Comparator<java.lang.String> c)
          This will sort the supplied string array.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BubbleSort

public BubbleSort()
Method Detail

sort

public void sort(java.lang.String[] array)
This will sort the supplied string array.

Specified by:
sort in interface ArraySorter
Parameters:
array - To sort

sort

public void sort(java.lang.String[] array,
                 java.util.Comparator<java.lang.String> c)
This will sort the supplied string array.

Specified by:
sort in interface ArraySorter
Parameters:
array - To sort
c - Comparator to sort with


Copyright © 2003-2010 Virginia Tech. All Rights Reserved.