Interface SelectionSorterWeightFactory<Solution_,T>
- Type Parameters:
Solution_
- the solution type, the class with thePlanningSolution
annotationT
- the selection type
- All Known Subinterfaces:
PlanningEntity.NullDifficultyWeightFactory
,PlanningVariable.NullStrengthWeightFactory
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Creates a weight to decide the order of a collections of selections
(a selection is a
PlanningEntity
, a planningValue, a Move
or a Selector
).
The selections are then sorted by their weight,
normally ascending unless it's configured descending.
Implementations are expected to be stateless. The solver may choose to reuse instances.
-
Method Summary
-
Method Details
-
createSorterWeight
- Parameters:
solution
- never null, thePlanningSolution
to which the selection belongs or applies toselection
- never null, aPlanningEntity
, a planningValue, aMove
or aSelector
- Returns:
- never null, for example a
Integer
,Double
or a more complexComparable
-