Class ComparatorSelectionSorter<Solution_,T>
java.lang.Object
org.optaplanner.core.impl.heuristic.selector.common.decorator.ComparatorSelectionSorter<Solution_,T>
- Type Parameters:
Solution_
- the solution type, the class with thePlanningSolution
annotationT
- the selection type
- All Implemented Interfaces:
SelectionSorter<Solution_,
T>
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
-
Constructor Details
-
ComparatorSelectionSorter
public ComparatorSelectionSorter(Comparator<T> comparator, SelectionSorterOrder selectionSorterOrder)
-
-
Method Details
-
sort
- Specified by:
sort
in interfaceSelectionSorter<Solution_,
T> - Parameters:
scoreDirector
- never null, theScoreDirector
which has theScoreDirector.getWorkingSolution()
to which the selections belong or apply toselectionList
- never null, aList
ofPlanningEntity
, planningValue,Move
orSelector
-
equals
-
hashCode
public int hashCode()
-