Interface SelectionSorterWeightFactory<Solution_,T>

Type Parameters:
Solution_ - the solution type, the class with the PlanningSolution annotation
T - the selection type
All Superinterfaces:
ComparatorFactory<Solution_,T>
All Known Subinterfaces:
PlanningEntity.NullDifficultyWeightFactory<Solution_,T>, PlanningVariable.NullStrengthWeightFactory<Solution_,T>
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@Deprecated(forRemoval=true, since="1.28.0") @FunctionalInterface public interface SelectionSorterWeightFactory<Solution_,T> extends ComparatorFactory<Solution_,T>
Deprecated, for removal: This API element is subject to removal in a future version.
Deprecated in favor of ComparatorFactory.
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

    Modifier and Type
    Method
    Description
    default Comparator<T>
    Deprecated, for removal: This API element is subject to removal in a future version.
    Default implementation for enabling interconnection between the two comparator contracts.
    createSorterWeight(Solution_ solution, T selection)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
  • Method Details

    • createSorterWeight

      Comparable createSorterWeight(Solution_ solution, T selection)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Parameters:
      solution - never null, the PlanningSolution to which the selection belongs or applies to
      selection - never null, a PlanningEntity, a planningValue, a Move or a Selector
      Returns:
      never null, for example a Integer, Double or a more complex Comparable
    • createComparator

      default Comparator<T> createComparator(Solution_ solution)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Default implementation for enabling interconnection between the two comparator contracts.
      Specified by:
      createComparator in interface ComparatorFactory<Solution_,T>
      Parameters:
      solution - never null, the PlanningSolution to which the selection belongs or applies to
      Returns:
      never null