Package dsa.lab04.base
Interface Sorter
- All Known Implementing Classes:
HeapSorter
,HeapSorter
,InsertionSorter
,InsertionSorter
,MergeSorter
,MergeSorter
,SelectionSorter
,SelectionSorter
public interface Sorter
A sorting algorithm.
-
Method Summary
Modifier and TypeMethodDescriptiondefault <Item extends Comparable<Item>>
voidsort
(StaticSequence<Item> items) Sorts the given sequence.<Item> void
sort
(StaticSequence<Item> items, Comparator<Item> comparator) Sorts the given sequence according to the given comparator.
-
Method Details
-
sort
Sorts the given sequence according to the given comparator.- Type Parameters:
Item
- the item type- Parameters:
items
- the items to sortcomparator
- how to compare the items
-
sort
Sorts the given sequence.- Type Parameters:
Item
- the item type- Parameters:
items
- the items to sort
-