Record Class VariableUpdaterInfo<Solution_>
java.lang.Object
java.lang.Record
ai.timefold.solver.core.impl.domain.variable.declarative.VariableUpdaterInfo<Solution_>
@NullMarked
public record VariableUpdaterInfo<Solution_>(VariableMetaModel<Solution_,?,?> id, int groupId, DeclarativeShadowVariableDescriptor<Solution_> variableDescriptor, EntityConsistencyState<Solution_,Object> entityConsistencyState, MemberAccessor memberAccessor, BiFunction<@Nullable Solution_,Object,Object> calculator, @Nullable Object[] groupEntities)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionVariableUpdaterInfo(VariableMetaModel<Solution_, ?, ?> id, int groupId, DeclarativeShadowVariableDescriptor<Solution_> variableDescriptor, EntityConsistencyState<Solution_, Object> entityConsistencyState, MemberAccessor memberAccessor, MemberAccessor calculatorAccessor) VariableUpdaterInfo(VariableMetaModel<Solution_, ?, ?> id, int groupId, DeclarativeShadowVariableDescriptor<Solution_> variableDescriptor, EntityConsistencyState<Solution_, Object> entityConsistencyState, MemberAccessor memberAccessor, BiFunction<@Nullable Solution_, Object, Object> calculator, @Nullable Object[] groupEntities) Creates an instance of aVariableUpdaterInforecord class. -
Method Summary
Modifier and TypeMethodDescriptionBiFunction<@Nullable Solution_,Object, Object> Returns the value of thecalculatorrecord component.Returns the value of theentityConsistencyStaterecord component.booleanIndicates whether some other object is "equal to" this one.@Nullable Object[]Returns the value of thegroupEntitiesrecord component.intgroupId()Returns the value of thegroupIdrecord component.inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.Returns the value of thememberAccessorrecord component.toString()Returns a string representation of this record class.booleanupdateIfChanged(Object entity, @Nullable Object newValue, ChangedVariableNotifier<Solution_> changedVariableNotifier) booleanupdateIfChanged(Object entity, ChangedVariableNotifier<Solution_> changedVariableNotifier) Returns the value of thevariableDescriptorrecord component.withGroupEntities(Object[] groupEntities) withGroupId(int groupId)
-
Constructor Details
-
VariableUpdaterInfo
public VariableUpdaterInfo(VariableMetaModel<Solution_, ?, ?> id, int groupId, DeclarativeShadowVariableDescriptor<Solution_> variableDescriptor, EntityConsistencyState<Solution_, Object> entityConsistencyState, MemberAccessor memberAccessor, MemberAccessor calculatorAccessor) -
VariableUpdaterInfo
public VariableUpdaterInfo(VariableMetaModel<Solution_, ?, ?> id, int groupId, DeclarativeShadowVariableDescriptor<Solution_> variableDescriptor, EntityConsistencyState<Solution_, Object> entityConsistencyState, MemberAccessor memberAccessor, BiFunction<@Nullable Solution_, Object, Object> calculator, @Nullable Object[] groupEntities) Creates an instance of aVariableUpdaterInforecord class.- Parameters:
id- the value for theidrecord componentgroupId- the value for thegroupIdrecord componentvariableDescriptor- the value for thevariableDescriptorrecord componententityConsistencyState- the value for theentityConsistencyStaterecord componentmemberAccessor- the value for thememberAccessorrecord componentcalculator- the value for thecalculatorrecord componentgroupEntities- the value for thegroupEntitiesrecord component
-
-
Method Details
-
withGroupId
-
withGroupEntities
-
updateIfChanged
public boolean updateIfChanged(Object entity, ChangedVariableNotifier<Solution_> changedVariableNotifier) -
updateIfChanged
public boolean updateIfChanged(Object entity, @Nullable Object newValue, ChangedVariableNotifier<Solution_> changedVariableNotifier) -
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
hashCode
public int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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. -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
groupId
public int groupId()Returns the value of thegroupIdrecord component.- Returns:
- the value of the
groupIdrecord component
-
variableDescriptor
Returns the value of thevariableDescriptorrecord component.- Returns:
- the value of the
variableDescriptorrecord component
-
entityConsistencyState
Returns the value of theentityConsistencyStaterecord component.- Returns:
- the value of the
entityConsistencyStaterecord component
-
memberAccessor
Returns the value of thememberAccessorrecord component.- Returns:
- the value of the
memberAccessorrecord component
-
calculator
Returns the value of thecalculatorrecord component.- Returns:
- the value of the
calculatorrecord component
-
groupEntities
Returns the value of thegroupEntitiesrecord component.- Returns:
- the value of the
groupEntitiesrecord component
-