Class GenuineVariableDescriptor<Solution_>
java.lang.Object
ai.timefold.solver.core.impl.domain.variable.descriptor.VariableDescriptor<Solution_>
ai.timefold.solver.core.impl.domain.variable.descriptor.GenuineVariableDescriptor<Solution_>
- Type Parameters:
Solution_- the solution type, the class with thePlanningSolutionannotation
- Direct Known Subclasses:
BasicVariableDescriptor,ListVariableDescriptor
-
Field Summary
Fields inherited from class ai.timefold.solver.core.impl.domain.variable.descriptor.VariableDescriptor
cachedMetamodel, entityDescriptor, ordinal, simpleEntityAndVariableName, sinkVariableDescriptorList, variableMemberAccessor, variableName -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedGenuineVariableDescriptor(int ordinal, EntityDescriptor<Solution_> entityDescriptor, MemberAccessor variableMemberAccessor) -
Method Summary
Modifier and TypeMethodDescriptionabstract booleanacceptsValueType(Class<?> valueType) booleanReturns true if the value range can be directly extracted from the solution.abstract booleanisInitialized(Object entity) A basic planning variableallowing unassignedandPlanningListVariableare always considered initialized.booleanisReinitializable(Object entity) Decides whether an entity is eligible for initialization.voidlinkVariableDescriptors(DescriptorPolicy descriptorPolicy) voidprocessAnnotations(DescriptorPolicy descriptorPolicy) protected abstract voidprocessPropertyAnnotations(DescriptorPolicy descriptorPolicy) protected voidprocessSorting(String comparatorPropertyName, Class<? extends Comparator> comparatorClass, String comparatorFactoryPropertyName, Class<? extends ComparatorFactory> comparatorFactoryClass) protected voidprocessValueRangeRefs(DescriptorPolicy descriptorPolicy, String[] valueRangeProviderRefs) toString()Methods inherited from class ai.timefold.solver.core.impl.domain.variable.descriptor.VariableDescriptor
canBeUsedAsSource, getEntityDescriptor, getMemberAccessorSpeedNote, getOrdinal, getSimpleEntityAndVariableName, getSinkVariableDescriptorList, getValue, getVariableMetaModel, getVariableName, getVariablePropertyType, isGenuineAndUninitialized, isListVariable, isValuePotentialAnchor, registerSinkVariableDescriptor, setValue
-
Constructor Details
-
GenuineVariableDescriptor
protected GenuineVariableDescriptor(int ordinal, EntityDescriptor<Solution_> entityDescriptor, MemberAccessor variableMemberAccessor)
-
-
Method Details
-
processAnnotations
-
processPropertyAnnotations
-
processValueRangeRefs
protected void processValueRangeRefs(DescriptorPolicy descriptorPolicy, String[] valueRangeProviderRefs) -
processSorting
protected void processSorting(String comparatorPropertyName, Class<? extends Comparator> comparatorClass, String comparatorFactoryPropertyName, Class<? extends ComparatorFactory> comparatorFactoryClass) -
linkVariableDescriptors
- Specified by:
linkVariableDescriptorsin classVariableDescriptor<Solution_>
-
acceptsValueType
-
getValueRangeDescriptor
-
canExtractValueRangeFromSolution
public boolean canExtractValueRangeFromSolution()Returns true if the value range can be directly extracted from the solution.- See Also:
-
isInitialized
A basic planning variableallowing unassignedandPlanningListVariableare always considered initialized.- Parameters:
entity- never null- Returns:
- true if the variable on that entity is initialized
-
isReinitializable
Decides whether an entity is eligible for initialization. This is not an opposite ofisInitialized()because even avariable that allows unassigned, which is always considered initialized, is reinitializable if its value isnull. -
getAscendingSorter
-
getDescendingSorter
-
toString
-