Interface SorterConfiguration


public interface SorterConfiguration
Configuration for a specific sorter.
Author:
Richard van den Ham (r.vandenham@fontys.nl)
  • Method Details

    • getName

      String getName()
      Get name of sorter implementation.
      Returns:
      name
    • getSortKind

      SortKind getSortKind()
      Get the SortKind of the sorter implementation.
      Returns:
      sortKind
    • usesPriorityQueue

      boolean usesPriorityQueue()
      Indicates whether this sorter uses a Priority Queue.
      Returns:
      true if configuration uses priority queue, false otherwise.
    • getQueue

      <T> Queue<T> getQueue()
      Get queue for sorter.
      Type Parameters:
      T - the type of elements in the queue
      Returns:
      queue for sorter
    • getPriorityQueue

      <T> PriorityQueue<T> getPriorityQueue(Comparator<T> comparator)
      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

      <T> Sorter<T> getSorter()
      Get a sorter.
      Type Parameters:
      T - the type of elements in the queue
      Returns:
      sorter