Interface AbstractVariableListener<Solution_,Entity_>
-
- Type Parameters:
Solution_- the solution type, the class with thePlanningSolutionannotationEntity_-
- 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
public interface AbstractVariableListener<Solution_,Entity_> extends Closeable
Common ancestor for specialized planning variable listeners.Do not implement this interface directly. Implement either
VariableListenerorListVariableListener.- See Also:
VariableListener,ListVariableListener
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description voidafterEntityAdded(ScoreDirector<Solution_> scoreDirector, Entity_ entity)voidafterEntityRemoved(ScoreDirector<Solution_> scoreDirector, Entity_ entity)voidbeforeEntityAdded(ScoreDirector<Solution_> scoreDirector, Entity_ entity)voidbeforeEntityRemoved(ScoreDirector<Solution_> scoreDirector, Entity_ entity)default voidclose()Called before thisAbstractVariableListeneris thrown away and not used anymore.default voidresetWorkingSolution(ScoreDirector<Solution_> scoreDirector)Called when the entire working solution changes.
-
-
-
Method Detail
-
beforeEntityAdded
void beforeEntityAdded(ScoreDirector<Solution_> scoreDirector, Entity_ entity)
- Parameters:
scoreDirector- never nullentity- never null
-
afterEntityAdded
void afterEntityAdded(ScoreDirector<Solution_> scoreDirector, Entity_ entity)
- Parameters:
scoreDirector- never nullentity- never null
-
beforeEntityRemoved
void beforeEntityRemoved(ScoreDirector<Solution_> scoreDirector, Entity_ entity)
- Parameters:
scoreDirector- never nullentity- never null
-
afterEntityRemoved
void afterEntityRemoved(ScoreDirector<Solution_> scoreDirector, Entity_ entity)
- Parameters:
scoreDirector- never nullentity- never null
-
resetWorkingSolution
default void resetWorkingSolution(ScoreDirector<Solution_> scoreDirector)
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 thisAbstractVariableListeneris thrown away and not used anymore.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-
-