edu.vt.middleware.dictionary.sort
Class InsertionSort

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

public class InsertionSort
extends java.lang.Object
implements ArraySorter

Provides an implementation of the insertion sort algorithm.

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

Constructor Summary
InsertionSort()
           
 
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

InsertionSort

public InsertionSort()
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.