Record Class DefaultPlanningListVariableMetaModel<Solution_,Entity_,Value_>
java.lang.Object
java.lang.Record
ai.timefold.solver.core.impl.domain.solution.descriptor.DefaultPlanningListVariableMetaModel<Solution_,Entity_,Value_>
- All Implemented Interfaces:
InnerVariableMetaModel<Solution_>,GenuineVariableMetaModel<Solution_,,Entity_, Value_> PlanningListVariableMetaModel<Solution_,,Entity_, Value_> VariableMetaModel<Solution_,Entity_, Value_>
@NullMarked
public record DefaultPlanningListVariableMetaModel<Solution_,Entity_,Value_> (PlanningEntityMetaModel<Solution_,Entity_> entity, ListVariableDescriptor<Solution_> variableDescriptor)
extends Record
implements PlanningListVariableMetaModel<Solution_,Entity_,Value_>, InnerVariableMetaModel<Solution_>
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultPlanningListVariableMetaModel(PlanningEntityMetaModel<Solution_, Entity_> entity, ListVariableDescriptor<Solution_> variableDescriptor) Creates an instance of aDefaultPlanningListVariableMetaModelrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns whether the planning variable allows values not to be assigned to any entity's list variable.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.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.PlanningListVariableMetaModel
isList
-
Constructor Details
-
DefaultPlanningListVariableMetaModel
public DefaultPlanningListVariableMetaModel(PlanningEntityMetaModel<Solution_, Entity_> entity, ListVariableDescriptor<Solution_> variableDescriptor) Creates an instance of aDefaultPlanningListVariableMetaModelrecord 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
-
allowsUnassignedValues
public boolean allowsUnassignedValues()Description copied from interface:PlanningListVariableMetaModelReturns whether the planning variable allows values not to be assigned to any entity's list variable.- Specified by:
allowsUnassignedValuesin interfacePlanningListVariableMetaModel<Solution_,Entity_, Value_> - Returns:
trueif the planning variable allows unassigned values,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
-