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

## Class NullValueReinitializeVariableEntityFilter<Solution_>

- java.lang.Object
- - org.optaplanner.core.impl.heuristic.selector.entity.decorator.NullValueReinitializeVariableEntityFilter<Solution_>

- Type Parameters:
    `Solution_` - the solution type, the class with the `PlanningSolution` annotation
  All Implemented Interfaces:
    SelectionFilter<Solution_,Object>

      public class NullValueReinitializeVariableEntityFilter<Solution_>
      extends Object
      implements SelectionFilter<Solution_,Object>

  Behaves as if it was a UninitializedVariableEntityFilter, except when the variable is `PlanningVariable.nullable()`.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `NullValueReinitializeVariableEntityFilter(GenuineVariableDescriptor<Solution_> variableDescriptor)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `accept(ScoreDirector<Solution_> scoreDirector, Object entity)`

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

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

- - ### Constructor Detail

    - #### NullValueReinitializeVariableEntityFilter

          public NullValueReinitializeVariableEntityFilter(GenuineVariableDescriptor<Solution_> variableDescriptor)

  - ### Method Detail

    - #### accept

          public boolean accept(ScoreDirector<Solution_> scoreDirector,
                                Object entity)

      Specified by:
        `accept` in interface `SelectionFilter<Solution_,Object>`
      Parameters:
        `scoreDirector` - never null, the `ScoreDirector` which has the `ScoreDirector.getWorkingSolution()` to which the selection belongs or applies to
        `entity` - never null, a `PlanningEntity`, a planningValue, a `Move` or a `Selector`
      Returns:
        true if the selection is accepted (for example it is movable), false if the selection will be discarded (for example it is pinned)

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