Package org.optaplanner.core.impl.heuristic.selector.common.decorator

## Interface SelectionSorterWeightFactory<Solution_,​T>

- Type Parameters:
    `Solution_` - the solution type, the class with the `PlanningSolution` annotation
    `T` - the selection type
  All Known Subinterfaces:
    `PlanningEntity.NullDifficultyWeightFactory`, `PlanningVariable.NullStrengthWeightFactory`

      public interface SelectionSorterWeightFactory<Solution_,​T>

  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.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `Comparable` | `createSorterWeight​(Solution_ solution, T selection)` |

- - ### Method Detail

    - #### createSorterWeight

          Comparable createSorterWeight​(Solution_ solution,
                                        T selection)

      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`