Interface SelectionSorter<Solution_,T>

Type Parameters:
Solution_ - the solution type, the class with the PlanningSolution annotation
T - the selection type
All Known Implementing Classes:
ComparatorFactorySelectionSorter, ComparatorSelectionSorter

@NullMarked public interface SelectionSorter<Solution_,T>
Decides the order of a List of selection (which is a PlanningEntity, a planningValue, a Move or a Selector).

Implementations are expected to be stateless. The solver may choose to reuse instances.

  • Method Summary

    Modifier and Type
    Method
    Description
    void
    sort(Solution_ solution, List<T> selectionList)
    Performs an in-place sorting operation on the given selection list.
    sort(Solution_ solution, Set<T> selectionSet)
    Creates a copy of the provided set and sort the data.
  • Method Details

    • sort

      void sort(Solution_ solution, List<T> selectionList)
      Performs an in-place sorting operation on the given selection list.
      Parameters:
      solution - never null, the current solution
      selectionList - never null, a List of PlanningEntity, planningValue, Move or Selector that will be sorted.
    • sort

      SortedSet<T> sort(Solution_ solution, Set<T> selectionSet)
      Creates a copy of the provided set and sort the data.
      Parameters:
      solution - never null, the current solution
      selectionSet - never null, a Set of values that will be used as input for sorting.