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

Rename and reduce ListVariableListener methods

    XMLWordPrintable

Details

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

    Description

      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.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: