Class SelectionSort
java.lang.Object
|
+--SelectionSort
- All Implemented Interfaces:
- ISort
- public class SelectionSort
- extends Object
- implements ISort
Implementation of the selection sort algorithm.
Method Summary |
String |
getName()
Returns the name of this sort algorithm. |
void |
sort(Comparable[] anArray)
Performs the selection sort algorithm
on the given array of objects. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SelectionSort
public SelectionSort()
getName
public String getName()
- Returns the name of this sort algorithm.
- Specified by:
getName
in interface ISort
sort
public void sort(Comparable[] anArray)
- Performs the selection sort algorithm
on the given array of objects.
- Specified by:
sort
in interface ISort
- Parameters:
anArray
- array of objects to sort