Interface AbstractVariableListener<Solution_,Entity_>
- Type Parameters:
Solution_- the solution type, the class with thePlanningSolutionannotationEntity_-PlanningEntityon which the source variable is declared
- All Superinterfaces:
AutoCloseable,Closeable
- All Known Subinterfaces:
CustomShadowVariable.NullVariableListener,ListVariableListener<Solution_,,Entity_, Element_> ListVariableStateSupply<Solution_>,ShadowVariable.NullVariableListener,SourcedVariableListener<Solution_>,VariableListener<Solution_,Entity_>
- All Known Implementing Classes:
AnchorVariableListener,CollectionInverseVariableListener,ExternalizedAnchorVariableSupply,ExternalizedCollectionInverseVariableSupply,ExternalizedSingletonInverseVariableSupply,ListVariableTracker,SingletonInverseVariableListener,VariableTracker
Common ancestor for specialized planning variable listeners.
Do not implement this interface directly.
Implement either VariableListener or ListVariableListener.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoidafterEntityAdded(@NonNull ScoreDirector<Solution_> scoreDirector, @NonNull Entity_ entity) voidafterEntityRemoved(@NonNull ScoreDirector<Solution_> scoreDirector, @NonNull Entity_ entity) voidbeforeEntityAdded(@NonNull ScoreDirector<Solution_> scoreDirector, @NonNull Entity_ entity) voidbeforeEntityRemoved(@NonNull ScoreDirector<Solution_> scoreDirector, @NonNull Entity_ entity) default voidclose()Called before thisAbstractVariableListeneris thrown away and not used anymore.default voidresetWorkingSolution(@NonNull ScoreDirector<Solution_> scoreDirector) Called when the entire working solution changes.
-
Method Details
-
beforeEntityAdded
-
afterEntityAdded
-
beforeEntityRemoved
-
afterEntityRemoved
-
resetWorkingSolution
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()Called before thisAbstractVariableListeneris thrown away and not used anymore.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-