Interface AbstractVariableListener<Solution_,Entity_>

Type Parameters:
Solution_ - the solution type, the class with the PlanningSolution annotation
Entity_ - PlanningEntity on which the source variable is declared
All Superinterfaces:
AutoCloseable, Closeable
All Known Subinterfaces:
CustomShadowVariable.NullVariableListener, ListVariableListener<Solution_,Entity_,Element_>, ShadowVariable.NullVariableListener, VariableListener<Solution_,Entity_>

@Deprecated(since="1.27.0", forRemoval=true) public interface AbstractVariableListener<Solution_,Entity_> extends Closeable
Deprecated, for removal: This API element is subject to removal in a future version.
Use a ShadowVariable with a supplier and sources instead.
Common ancestor for specialized planning variable listeners.

Do not implement this interface directly. Implement either VariableListener or ListVariableListener.

See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    afterEntityAdded(@NonNull ScoreDirector<Solution_> scoreDirector, @NonNull Entity_ entity)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    void
    afterEntityRemoved(@NonNull ScoreDirector<Solution_> scoreDirector, @NonNull Entity_ entity)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    void
    beforeEntityAdded(@NonNull ScoreDirector<Solution_> scoreDirector, @NonNull Entity_ entity)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    void
    beforeEntityRemoved(@NonNull ScoreDirector<Solution_> scoreDirector, @NonNull Entity_ entity)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    default void
    Deprecated, for removal: This API element is subject to removal in a future version.
    Called before this AbstractVariableListener is thrown away and not used anymore.
    default void
    resetWorkingSolution(@NonNull ScoreDirector<Solution_> scoreDirector)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Called when the entire working solution changes.
  • Method Details

    • beforeEntityAdded

      void beforeEntityAdded(@NonNull ScoreDirector<Solution_> scoreDirector, @NonNull Entity_ entity)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • afterEntityAdded

      void afterEntityAdded(@NonNull ScoreDirector<Solution_> scoreDirector, @NonNull Entity_ entity)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • beforeEntityRemoved

      void beforeEntityRemoved(@NonNull ScoreDirector<Solution_> scoreDirector, @NonNull Entity_ entity)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • afterEntityRemoved

      void afterEntityRemoved(@NonNull ScoreDirector<Solution_> scoreDirector, @NonNull Entity_ entity)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • resetWorkingSolution

      default void resetWorkingSolution(@NonNull ScoreDirector<Solution_> scoreDirector)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Called when the entire working solution changes. In this event, the other before..()/after...() methods will not be called. At this point, implementations should clear state, if any.
    • close

      default void close()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Called before this AbstractVariableListener is thrown away and not used anymore.
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable