FlexOr.searchAndSort
Class InsertSort

java.lang.Object
  extended by FlexOr.searchAndSort.InsertSort
All Implemented Interfaces:
ArraySort

public class InsertSort
extends java.lang.Object
implements ArraySort

Sort an array of objects using insert sort.

Version:
1.0 1999 Jan 15
Author:
Gunnar Gotshalks

Constructor Summary
InsertSort()
           
 
Method Summary
static void execute(java.lang.Object[] array, BinaryPredicate bp)
          The insert sort method.
 void sort(java.lang.Object[] array, BinaryPredicate bp)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InsertSort

public InsertSort()
Method Detail

sort

public void sort(java.lang.Object[] array,
                 BinaryPredicate bp)
Specified by:
sort in interface ArraySort
Parameters:
array - Array of elements to be sorted.
bp - Defines how array elements are compared.

execute

public static void execute(java.lang.Object[] array,
                           BinaryPredicate bp)
The insert sort method.

Parameters:
array - Array of elements to be sorted.
bp - Defines how array elements are compared.