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

Rename and reduce ListVariableListener methods

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Done
    • Icon: Major Major
    • 8.29.0.Final
    • None
    • optaplanner-core
    • None

      Rename the methods according to the naming meeting agreement:

      • listVariableChanged
      • listVariableElementAssigned
      • listVariableElementUnassigned

      ListVariableListener will be slimmed down to:

      • afterListVariableElementUnassigned(scoreDirector, element)
      • beforeListVariableChanged(...)
      • afterListVariableChanged(...)

      afterListVariableElementUnassigned() is the only un/assignment method listeners need to implement. It is necessary so that listeners can unset shadow variables after an element is unassigned.

      On the other hand, moves are required to go through the full ceremony and call before/afterElement(Un)Assigned. Although some of the calls are no-ops we require them anyway to avoid later finding out they're needed.

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

                Created:
                Updated:
                Resolved: