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

## Class WeightFactorySelectionSorter<Solution_,T>

- java.lang.Object
- - org.optaplanner.core.impl.heuristic.selector.common.decorator.WeightFactorySelectionSorter<Solution_,T>

- Type Parameters:
    `Solution_` - the solution type, the class with the `PlanningSolution` annotation
    `T` - the selection type
  All Implemented Interfaces:
    SelectionSorter<Solution_,T>

      public class WeightFactorySelectionSorter<Solution_,T>
      extends Object
      implements SelectionSorter<Solution_,T>

  Sorts a selection `List` based on a `SelectionSorterWeightFactory`.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `WeightFactorySelectionSorter(SelectionSorterWeightFactory<Solution_,T> selectionSorterWeightFactory, SelectionSorterOrder selectionSorterOrder)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `sort(ScoreDirector<Solution_> scoreDirector, List<T> selectionList)`
    `void` | `sort(Solution_ solution, List<T> selectionList)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### WeightFactorySelectionSorter

          public WeightFactorySelectionSorter(SelectionSorterWeightFactory<Solution_,T> selectionSorterWeightFactory,
                                              SelectionSorterOrder selectionSorterOrder)

  - ### Method Detail

    - #### sort

          public void sort(ScoreDirector<Solution_> scoreDirector,
                           List<T> selectionList)

      Specified by:
        `sort` in interface `SelectionSorter<Solution_,T>`
      Parameters:
        `scoreDirector` - never null, the `ScoreDirector` which has the `ScoreDirector.getWorkingSolution()` to which the selections belong or apply to
        `selectionList` - never null, a `List` of `PlanningEntity`, planningValue, `Move` or `Selector`

    - #### sort

          public void sort(Solution_ solution,
                           List<T> selectionList)

      Parameters:
        `solution` - never null, the `PlanningSolution` to which the selections belong or apply to
        `selectionList` - never null, a `List` of `PlanningEntity`, planningValue, `Move` or `Selector`

Copyright © 2006–2021 JBoss by Red Hat. All rights reserved.