Class ComparatorSelectionSorter<Solution_,T>
java.lang.Object
ai.timefold.solver.core.impl.heuristic.selector.common.decorator.ComparatorSelectionSorter<Solution_,T>
- Type Parameters:
Solution_- the solution type, the class with thePlanningSolutionannotationT- the selection type
- All Implemented Interfaces:
SelectionSorter<Solution_,T>
@NullMarked
public final class ComparatorSelectionSorter<Solution_,T>
extends Object
implements SelectionSorter<Solution_,T>
Sorts a selection
List based on a Comparator.-
Constructor Summary
ConstructorsConstructorDescriptionComparatorSelectionSorter(Comparator<T> comparator, SelectionSorterOrder selectionSorterOrder) -
Method Summary
Modifier and TypeMethodDescriptionbooleaninthashCode()voidPerforms an in-place sorting operation on the given selection list.Creates a copy of the provided set and sort the data.
-
Constructor Details
-
ComparatorSelectionSorter
public ComparatorSelectionSorter(Comparator<T> comparator, SelectionSorterOrder selectionSorterOrder)
-
-
Method Details
-
sort
Description copied from interface:SelectionSorterPerforms an in-place sorting operation on the given selection list.- Specified by:
sortin interfaceSelectionSorter<Solution_,T> - Parameters:
solution- never null, the current solutionselectionList- never null, aListofPlanningEntity, planningValue,MoveorSelectorthat will be sorted.
-
sort
Description copied from interface:SelectionSorterCreates a copy of the provided set and sort the data.- Specified by:
sortin interfaceSelectionSorter<Solution_,T> - Parameters:
solution- never null, the current solutionselectionSet- never null, aSetof values that will be used as input for sorting.
-
equals
-
hashCode
public int hashCode()
-