Interface VariableListener<Solution_,​Entity_>

    • Method Detail

      • requiresUniqueEntityEvents

        default boolean requiresUniqueEntityEvents()
        When set to true, this has a performance loss. When set to false, it's easier to make the listener implementation correct and fast.
        Returns:
        true to guarantee that each of the before/after methods is only called once per entity instance per operation type (add, change or remove).
      • beforeVariableChanged

        void beforeVariableChanged​(ScoreDirector<Solution_> scoreDirector,
                                   Entity_ entity)
        Parameters:
        scoreDirector - never null
        entity - never null
      • afterVariableChanged

        void afterVariableChanged​(ScoreDirector<Solution_> scoreDirector,
                                  Entity_ entity)
        Parameters:
        scoreDirector - never null
        entity - never null