Uploaded image for project: 'OptaPlanner'
  1. OptaPlanner
  2. PLANNER-2590

Inline GenuineVariableDescriptor's NullValueReinitializeVariableEntityFilter

XMLWordPrintable

    • Icon: Story Story
    • Resolution: Done
    • Icon: Optional Optional
    • 8.19.0.Final
    • None
    • optaplanner-core
    • None
    • 2022 Week 05-07 (from Jan 31), 2022 Week 08-10 (from Feb 21)
    • NEW
    • NEW

      The behavior is always the same so the isReinitialized() method can be simplified from

      public boolean isReinitializable(ScoreDirector<Solution_> scoreDirector, Object entity) {
          return reinitializeVariableEntityFilter.accept(scoreDirector, entity);
      }
      
      public boolean isReinitializable(Object entity) {
          return getValue(entity) == null;
      }
      
      • NullValueReinitializeVariableEntityFilter class can be deleted.
      • isReinitialized() no longer needs ScoreDirector. This has implications up to DefaultExhaustiveSearchPhase.
      • Unit tests needs to preserved!

              jlocker Jiří Locker (Inactive)
              jlocker Jiří Locker (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: