Class AnchorVariableListener<Solution_>
java.lang.Object
ai.timefold.solver.core.impl.domain.variable.anchor.AnchorVariableListener<Solution_>
- Type Parameters:
Solution_- the solution type, the class with thePlanningSolutionannotation
- All Implemented Interfaces:
AbstractVariableListener<Solution_,,Object> VariableListener<Solution_,,Object> AnchorVariableSupply,Supply,Closeable,AutoCloseable
public class AnchorVariableListener<Solution_>
extends Object
implements VariableListener<Solution_,Object>, AnchorVariableSupply
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final AnchorShadowVariableDescriptor<Solution_>protected final SingletonInverseVariableSupplyprotected final VariableDescriptor<Solution_> -
Constructor Summary
ConstructorsConstructorDescriptionAnchorVariableListener(AnchorShadowVariableDescriptor<Solution_> anchorShadowVariableDescriptor, VariableDescriptor<Solution_> previousVariableDescriptor, SingletonInverseVariableSupply nextVariableSupply) -
Method Summary
Modifier and TypeMethodDescriptionvoidafterEntityAdded(ScoreDirector<Solution_> scoreDirector, Object entity) voidafterEntityRemoved(ScoreDirector<Solution_> scoreDirector, Object entity) voidafterVariableChanged(ScoreDirector<Solution_> scoreDirector, Object entity) voidbeforeEntityAdded(ScoreDirector<Solution_> scoreDirector, Object entity) voidbeforeEntityRemoved(ScoreDirector<Solution_> scoreDirector, Object entity) voidbeforeVariableChanged(ScoreDirector<Solution_> scoreDirector, Object entity) protected voidinsert(InnerScoreDirector<Solution_, ?> scoreDirector, Object entity) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ai.timefold.solver.core.api.domain.variable.AbstractVariableListener
close, resetWorkingSolutionMethods inherited from interface ai.timefold.solver.core.api.domain.variable.VariableListener
requiresUniqueEntityEvents
-
Field Details
-
anchorShadowVariableDescriptor
-
previousVariableDescriptor
-
nextVariableSupply
-
-
Constructor Details
-
AnchorVariableListener
public AnchorVariableListener(AnchorShadowVariableDescriptor<Solution_> anchorShadowVariableDescriptor, VariableDescriptor<Solution_> previousVariableDescriptor, SingletonInverseVariableSupply nextVariableSupply)
-
-
Method Details
-
beforeEntityAdded
- Specified by:
beforeEntityAddedin interfaceAbstractVariableListener<Solution_,Object> - Parameters:
scoreDirector- never nullentity- never null
-
afterEntityAdded
- Specified by:
afterEntityAddedin interfaceAbstractVariableListener<Solution_,Object> - Parameters:
scoreDirector- never nullentity- never null
-
beforeVariableChanged
- Specified by:
beforeVariableChangedin interfaceVariableListener<Solution_,Object> - Parameters:
scoreDirector- never nullentity- never null
-
afterVariableChanged
- Specified by:
afterVariableChangedin interfaceVariableListener<Solution_,Object> - Parameters:
scoreDirector- never nullentity- never null
-
beforeEntityRemoved
- Specified by:
beforeEntityRemovedin interfaceAbstractVariableListener<Solution_,Object> - Parameters:
scoreDirector- never nullentity- never null
-
afterEntityRemoved
- Specified by:
afterEntityRemovedin interfaceAbstractVariableListener<Solution_,Object> - Parameters:
scoreDirector- never nullentity- never null
-
insert
-
getAnchor
- Specified by:
getAnchorin interfaceAnchorVariableSupply- Parameters:
entity- never null- Returns:
- sometimes null, the anchor for the entity
-