Interface AbstractVariableListener<Solution_,Entity_>
- Type Parameters:
Solution_
- the solution type, the class with thePlanningSolution
annotationEntity_
-
- All Superinterfaces:
AutoCloseable
,Closeable
- All Known Subinterfaces:
CustomShadowVariable.NullVariableListener
,ListVariableListener<Solution_,
,Entity_, Element_> SourcedVariableListener<Solution_>
,VariableListener<Solution_,
Entity_>
- All Known Implementing Classes:
AnchorVariableListener
,CollectionInverseVariableListener
,ExternalizedAnchorVariableSupply
,ExternalizedCollectionInverseVariableSupply
,ExternalizedIndexVariableSupply
,ExternalizedSingletonInverseVariableSupply
,ExternalizedSingletonListInverseVariableSupply
,IndexVariableListener
,NextElementVariableListener
,PreviousElementVariableListener
,SingletonInverseVariableListener
,SingletonListInverseVariableListener
Common ancestor for specialized planning variable listeners.
Do not implement this interface directly.
Implement either VariableListener
or ListVariableListener
.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoid
afterEntityAdded
(ScoreDirector<Solution_> scoreDirector, Entity_ entity) void
afterEntityRemoved
(ScoreDirector<Solution_> scoreDirector, Entity_ entity) void
beforeEntityAdded
(ScoreDirector<Solution_> scoreDirector, Entity_ entity) void
beforeEntityRemoved
(ScoreDirector<Solution_> scoreDirector, Entity_ entity) default void
close()
Called before thisAbstractVariableListener
is thrown away and not used anymore.default void
resetWorkingSolution
(ScoreDirector<Solution_> scoreDirector) Called when the entire working solution changes.
-
Method Details
-
beforeEntityAdded
- Parameters:
scoreDirector
- never nullentity
- never null
-
afterEntityAdded
- Parameters:
scoreDirector
- never nullentity
- never null
-
beforeEntityRemoved
- Parameters:
scoreDirector
- never nullentity
- never null
-
afterEntityRemoved
- Parameters:
scoreDirector
- never nullentity
- never null
-
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.- Parameters:
scoreDirector
- never null
-
close
default void close()Called before thisAbstractVariableListener
is thrown away and not used anymore.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
-