Record Class ChangedVariableNotifier<Solution_>
java.lang.Object
java.lang.Record
ai.timefold.solver.core.impl.domain.variable.declarative.ChangedVariableNotifier<Solution_>
public record ChangedVariableNotifier<Solution_>(BiConsumer<VariableDescriptor<Solution_>,Object> beforeVariableChanged, BiConsumer<VariableDescriptor<Solution_>,Object> afterVariableChanged, @Nullable InnerScoreDirector<Solution_,?> innerScoreDirector)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionChangedVariableNotifier(BiConsumer<VariableDescriptor<Solution_>, Object> beforeVariableChanged, BiConsumer<VariableDescriptor<Solution_>, Object> afterVariableChanged, @Nullable InnerScoreDirector<Solution_, ?> innerScoreDirector) Creates an instance of aChangedVariableNotifierrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theafterVariableChangedrecord component.Returns the value of thebeforeVariableChangedrecord component.static <Solution_>
ChangedVariableNotifier<Solution_>empty()final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@Nullable InnerScoreDirector<Solution_,?> Returns the value of theinnerScoreDirectorrecord component.static <Solution_>
ChangedVariableNotifier<Solution_>of(InnerScoreDirector<Solution_, ?> scoreDirector) final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ChangedVariableNotifier
public ChangedVariableNotifier(BiConsumer<VariableDescriptor<Solution_>, Object> beforeVariableChanged, BiConsumer<VariableDescriptor<Solution_>, Object> afterVariableChanged, @Nullable InnerScoreDirector<Solution_, ?> innerScoreDirector) Creates an instance of aChangedVariableNotifierrecord class.- Parameters:
beforeVariableChanged- the value for thebeforeVariableChangedrecord componentafterVariableChanged- the value for theafterVariableChangedrecord componentinnerScoreDirector- the value for theinnerScoreDirectorrecord component
-
-
Method Details
-
empty
-
of
public static <Solution_> ChangedVariableNotifier<Solution_> of(InnerScoreDirector<Solution_, ?> scoreDirector) -
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). -
beforeVariableChanged
Returns the value of thebeforeVariableChangedrecord component.- Returns:
- the value of the
beforeVariableChangedrecord component
-
afterVariableChanged
Returns the value of theafterVariableChangedrecord component.- Returns:
- the value of the
afterVariableChangedrecord component
-
innerScoreDirector
Returns the value of theinnerScoreDirectorrecord component.- Returns:
- the value of the
innerScoreDirectorrecord component
-