Record Class LegacyCustomShadowVariableListVariableListener<Solution_,Entity_,Element_>
java.lang.Object
java.lang.Record
ai.timefold.solver.core.impl.domain.variable.custom.LegacyCustomShadowVariableListVariableListener<Solution_,Entity_,Element_>
- All Implemented Interfaces:
InnerListVariableListener<Solution_,,Entity_, Element_> InnerVariableListener<Solution_,,ListElementsChangeEvent<Entity_>> Closeable,AutoCloseable
@NullMarked
public record LegacyCustomShadowVariableListVariableListener<Solution_,Entity_,Element_> (Class<? extends Entity_> sourceEntityClass, ListVariableListener<Solution_,Entity_,Element_> customVariableListener)
extends Record
implements InnerListVariableListener<Solution_,Entity_,Element_>
-
Constructor Summary
ConstructorsConstructorDescriptionLegacyCustomShadowVariableListVariableListener(Class<? extends Entity_> sourceEntityClass, ListVariableListener<Solution_, Entity_, Element_> customVariableListener) Creates an instance of aLegacyCustomShadowVariableListVariableListenerrecord class. -
Method Summary
Modifier and TypeMethodDescriptionvoidafterChange(InnerScoreDirector<Solution_, ?> scoreDirector, ListElementsChangeEvent<Entity_> changeEvent) voidafterListElementUnassigned(InnerScoreDirector<Solution_, ?> scoreDirector, Element_ unassignedElement) voidbeforeChange(InnerScoreDirector<Solution_, ?> scoreDirector, ListElementsChangeEvent<Entity_> changeEvent) voidclose()Called before thisInnerVariableListeneris thrown away and not used anymore.Returns the value of thecustomVariableListenerrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.voidresetWorkingSolution(InnerScoreDirector<Solution_, ?> scoreDirector) Called when the entire working solution changes.Returns the value of thesourceEntityClassrecord component.toString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface ai.timefold.solver.core.impl.domain.variable.InnerVariableListener
requiresUniqueEntityEvents
-
Constructor Details
-
LegacyCustomShadowVariableListVariableListener
public LegacyCustomShadowVariableListVariableListener(Class<? extends Entity_> sourceEntityClass, ListVariableListener<Solution_, Entity_, Element_> customVariableListener) Creates an instance of aLegacyCustomShadowVariableListVariableListenerrecord class.- Parameters:
sourceEntityClass- the value for thesourceEntityClassrecord componentcustomVariableListener- the value for thecustomVariableListenerrecord component
-
-
Method Details
-
beforeChange
public void beforeChange(InnerScoreDirector<Solution_, ?> scoreDirector, ListElementsChangeEvent<Entity_> changeEvent) - Specified by:
beforeChangein interfaceInnerVariableListener<Solution_,Entity_>
-
afterChange
public void afterChange(InnerScoreDirector<Solution_, ?> scoreDirector, ListElementsChangeEvent<Entity_> changeEvent) - Specified by:
afterChangein interfaceInnerVariableListener<Solution_,Entity_>
-
afterListElementUnassigned
public void afterListElementUnassigned(InnerScoreDirector<Solution_, ?> scoreDirector, Element_ unassignedElement) - Specified by:
afterListElementUnassignedin interfaceInnerListVariableListener<Solution_,Entity_, Element_>
-
resetWorkingSolution
Description copied from interface:InnerVariableListenerCalled 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.- Specified by:
resetWorkingSolutionin interfaceInnerVariableListener<Solution_,Entity_>
-
close
public void close()Description copied from interface:InnerVariableListenerCalled before thisInnerVariableListeneris thrown away and not used anymore.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceInnerVariableListener<Solution_,Entity_>
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
sourceEntityClass
Returns the value of thesourceEntityClassrecord component.- Returns:
- the value of the
sourceEntityClassrecord component
-
customVariableListener
Returns the value of thecustomVariableListenerrecord component.- Returns:
- the value of the
customVariableListenerrecord component
-