public class SelectionSort<T extends java.lang.Comparable<T>> extends SortAlgorithm<T>
Constructor and Description |
---|
SelectionSort(java.util.ArrayList<T> data)
this is the constructor of the SelectionSort class
|
Modifier and Type | Method and Description |
---|---|
java.util.ArrayList<T> |
getData() |
void |
setData(java.util.ArrayList<T> data)
to set the new data for data field
|
void |
sort()
sorts the data array and stores it there.
|
swap, swap
public SelectionSort(java.util.ArrayList<T> data)
data
- an ArrayList of type T that stores all the data that you want to get sortedpublic void sort()
public java.util.ArrayList<T> getData()
public void setData(java.util.ArrayList<T> data)
data
- an ArrayList of type T containing all the data that
should be sorted