Record Class DefaultPlanningVariableMetaModel<Solution_,Entity_,Value_>
java.lang.Object
java.lang.Record
ai.timefold.solver.core.impl.domain.solution.descriptor.DefaultPlanningVariableMetaModel<Solution_,Entity_,Value_>
- All Implemented Interfaces:
InnerVariableMetaModel<Solution_>,GenuineVariableMetaModel<Solution_,,Entity_, Value_> PlanningVariableMetaModel<Solution_,,Entity_, Value_> VariableMetaModel<Solution_,Entity_, Value_>
@NullMarked
public record DefaultPlanningVariableMetaModel<Solution_,Entity_,Value_> (PlanningEntityMetaModel<Solution_,Entity_> entity, BasicVariableDescriptor<Solution_> variableDescriptor)
extends Record
implements PlanningVariableMetaModel<Solution_,Entity_,Value_>, InnerVariableMetaModel<Solution_>
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultPlanningVariableMetaModel(PlanningEntityMetaModel<Solution_, Entity_> entity, BasicVariableDescriptor<Solution_> variableDescriptor) Creates an instance of aDefaultPlanningVariableMetaModelrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns whether the planning variable allows null values.entity()Returns the value of theentityrecord component.booleanIndicates whether some other object is "equal to" this one.inthashCode()Returns a hash code value for this object.booleanReturns whether the planning variable is chained.name()Describes the name of this variable, which is typically a field name in the entity.toString()Returns a string representation of this record class.type()Describes the type of the value that this variable can hold.Returns the value of thevariableDescriptorrecord component.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface ai.timefold.solver.core.preview.api.domain.metamodel.GenuineVariableMetaModel
ensurePlanningListVariable, ensurePlanningVariable, isGenuineMethods inherited from interface ai.timefold.solver.core.preview.api.domain.metamodel.PlanningVariableMetaModel
isList
-
Constructor Details
-
DefaultPlanningVariableMetaModel
public DefaultPlanningVariableMetaModel(PlanningEntityMetaModel<Solution_, Entity_> entity, BasicVariableDescriptor<Solution_> variableDescriptor) Creates an instance of aDefaultPlanningVariableMetaModelrecord class.- Parameters:
entity- the value for theentityrecord componentvariableDescriptor- the value for thevariableDescriptorrecord component
-
-
Method Details
-
type
Description copied from interface:VariableMetaModelDescribes the type of the value that this variable can hold.- Specified by:
typein interfaceVariableMetaModel<Solution_,Entity_, Value_> - Returns:
- never null
-
name
Description copied from interface:VariableMetaModelDescribes the name of this variable, which is typically a field name in the entity.- Specified by:
namein interfaceVariableMetaModel<Solution_,Entity_, Value_> - Returns:
- never null
-
allowsUnassigned
public boolean allowsUnassigned()Description copied from interface:PlanningVariableMetaModelReturns whether the planning variable allows null values.- Specified by:
allowsUnassignedin interfacePlanningVariableMetaModel<Solution_,Entity_, Value_> - Returns:
trueif the planning variable allows null values,falseotherwise.
-
isChained
public boolean isChained()Description copied from interface:PlanningVariableMetaModelReturns whether the planning variable is chained.- Specified by:
isChainedin interfacePlanningVariableMetaModel<Solution_,Entity_, Value_> - Returns:
trueif the planning variable is chained,falseotherwise.
-
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). -
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. -
entity
Returns the value of theentityrecord component.- Specified by:
entityin interfaceVariableMetaModel<Solution_,Entity_, Value_> - Returns:
- the value of the
entityrecord component
-
variableDescriptor
Returns the value of thevariableDescriptorrecord component.- Specified by:
variableDescriptorin interfaceInnerVariableMetaModel<Solution_>- Returns:
- the value of the
variableDescriptorrecord component
-