Package pl.put.poznan.transformer.logic
Interface SortAlgorithm
-
- All Known Implementing Classes:
BinaryInsertSort,BubbleSort,InsertSort,MergeSort,QuickSort,SelectionSort
public interface SortAlgorithmInterface defining a sorting algorithm. Concrete implementations of this interface are used to sort data in a number of ways.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classSortAlgorithm.OrderAn enumeration type for holding information about sorting direction.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleansort(Cell[][] tab, int column, int maxIter, SortAlgorithm.Order order)Method stub for the main sorting methods ofSortAlgorithmimplementations.
-
-
-
Method Detail
-
sort
boolean sort(Cell[][] tab, int column, int maxIter, SortAlgorithm.Order order)
Method stub for the main sorting methods ofSortAlgorithmimplementations. Sorting is performed in-place using the given array of data.- Parameters:
tab- a 2-D array of typeCellto be sortedcolumn- the number of the column which will be the sorting criteria.maxIter- maximum number of iterations. Value of-1means unlimited iterations,<-1means none.order- an enum Order value determining the sorting direction- Returns:
- a boolean value of whether sorting could be completed in the given number of iterations.
-
-