Interface SorterConfiguration
public interface SorterConfiguration
Configuration for a specific sorter.
- Author:
- Richard van den Ham (r.vandenham@fontys.nl)
-
Method Summary
Modifier and TypeMethodDescriptiondefault booleanIndicates whether the teacher tests should test this configuration.getName()Get name of sorter implementation.<T> PriorityQueue<T> getPriorityQueue(Comparator<T> comparator) Get priority queue.<T> Queue<T> getQueue()Get queue for sorter.<T> Sorter<T> Get a sorter.Get the SortKind of the sorter implementation.booleanIndicates whether this sorter uses a Priority Queue.
-
Method Details
-
getName
-
getSortKind
-
usesPriorityQueue
boolean usesPriorityQueue()Indicates whether this sorter uses a Priority Queue.- Returns:
- true if configuration uses priority queue, false otherwise.
-
getQueue
Get queue for sorter.- Type Parameters:
T- the type of elements in the queue- Returns:
- queue for sorter
-
getPriorityQueue
Get priority queue.- Type Parameters:
T- the type of elements in the queue- Parameters:
comparator- to compare elements in the queue- Returns:
- priority queue or null if configuration does not use priority queue.
-
getSorter
Get a sorter.- Type Parameters:
T- the type of elements in the queue- Returns:
- sorter
-
applyTeacherTests
default boolean applyTeacherTests()Indicates whether the teacher tests should test this configuration. Your own tests should test all configurations.- Returns:
- true if the teacher tests should test this configuration, true by default.
-