FlexOr.searchAndSort
Class SelectionSort

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

public class SelectionSort
extends java.lang.Object
implements ArraySort

Sort an array of objects using selection sort.

Version:
1.0 1999 Jan 15
Author:
Gunnar Gotshalks

Constructor Summary
SelectionSort()
           
 
Method Summary
static void execute(java.lang.Object[] array, BinaryPredicate bp)
          The selection 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

SelectionSort

public SelectionSort()
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 selection sort method.

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