Class GenuineVariableDescriptor<Solution_>
java.lang.Object
org.optaplanner.core.impl.domain.variable.descriptor.VariableDescriptor<Solution_>
org.optaplanner.core.impl.domain.variable.descriptor.GenuineVariableDescriptor<Solution_>
- Type Parameters:
Solution_
- the solution type, the class with thePlanningSolution
annotation
- Direct Known Subclasses:
BasicVariableDescriptor
,ListVariableDescriptor
-
Field Summary
Fields inherited from class org.optaplanner.core.impl.domain.variable.descriptor.VariableDescriptor
entityDescriptor, sinkVariableDescriptorList, variableMemberAccessor, variableName
-
Constructor Summary
ConstructorDescriptionGenuineVariableDescriptor
(EntityDescriptor<Solution_> entityDescriptor, MemberAccessor variableMemberAccessor) -
Method Summary
Modifier and TypeMethodDescriptionabstract boolean
acceptsValueType
(Class<?> valueType) long
getValueCount
(Solution_ solution, Object entity) boolean
abstract boolean
boolean
isGenuineAndUninitialized
(Object entity) abstract boolean
isInitialized
(Object entity) Anullable
planning variable andPlanningListVariable
are always considered initialized.abstract boolean
abstract boolean
boolean
isReinitializable
(Object entity) Decides whether an entity is eligible for initialization.boolean
void
linkVariableDescriptors
(DescriptorPolicy descriptorPolicy) void
processAnnotations
(DescriptorPolicy descriptorPolicy) protected abstract void
processPropertyAnnotations
(DescriptorPolicy descriptorPolicy) protected void
processStrength
(Class<? extends Comparator> strengthComparatorClass, Class<? extends SelectionSorterWeightFactory> strengthWeightFactoryClass) protected void
processValueRangeRefs
(DescriptorPolicy descriptorPolicy, String[] valueRangeProviderRefs) toString()
Methods inherited from class org.optaplanner.core.impl.domain.variable.descriptor.VariableDescriptor
getEntityDescriptor, getMemberAccessorSpeedNote, getSimpleEntityAndVariableName, getSinkVariableDescriptorList, getValue, getVariableName, getVariablePropertyType, isGenuineListVariable, isValuePotentialAnchor, registerSinkVariableDescriptor, setValue
-
Constructor Details
-
GenuineVariableDescriptor
public GenuineVariableDescriptor(EntityDescriptor<Solution_> entityDescriptor, MemberAccessor variableMemberAccessor)
-
-
Method Details
-
processAnnotations
-
processPropertyAnnotations
-
processValueRangeRefs
protected void processValueRangeRefs(DescriptorPolicy descriptorPolicy, String[] valueRangeProviderRefs) -
processStrength
protected void processStrength(Class<? extends Comparator> strengthComparatorClass, Class<? extends SelectionSorterWeightFactory> strengthWeightFactoryClass) -
linkVariableDescriptors
- Specified by:
linkVariableDescriptors
in classVariableDescriptor<Solution_>
-
isListVariable
public abstract boolean isListVariable() -
isChained
public abstract boolean isChained() -
isNullable
public abstract boolean isNullable() -
acceptsValueType
-
hasMovableChainedTrailingValueFilter
public boolean hasMovableChainedTrailingValueFilter() -
getMovableChainedTrailingValueFilter
-
getValueRangeDescriptor
-
isValueRangeEntityIndependent
public boolean isValueRangeEntityIndependent() -
isInitialized
Anullable
planning variable andPlanningListVariable
are always considered initialized.- Parameters:
entity
- never null- Returns:
- true if the variable on that entity is initialized
-
isGenuineAndUninitialized
- Specified by:
isGenuineAndUninitialized
in classVariableDescriptor<Solution_>
-
isReinitializable
Decides whether an entity is eligible for initialization. This is not an opposite ofisInitialized()
because even aPlanningVariable.nullable()
variable, which is always considered initialized, is reinitializable if its value isnull
. -
getIncreasingStrengthSorter
-
getDecreasingStrengthSorter
-
getValueCount
-
toString
-