Class ListVariableDescriptor<Solution_>
- java.lang.Object
-
- org.optaplanner.core.impl.domain.variable.descriptor.VariableDescriptor<Solution_>
-
- org.optaplanner.core.impl.domain.variable.descriptor.GenuineVariableDescriptor<Solution_>
-
- org.optaplanner.core.impl.domain.variable.descriptor.ListVariableDescriptor<Solution_>
-
public class ListVariableDescriptor<Solution_> extends GenuineVariableDescriptor<Solution_>
-
-
Field Summary
-
Fields inherited from class org.optaplanner.core.impl.domain.variable.descriptor.VariableDescriptor
entityDescriptor, sinkVariableDescriptorList, variableMemberAccessor, variableName
-
-
Constructor Summary
Constructors Constructor Description ListVariableDescriptor(EntityDescriptor<Solution_> entityDescriptor, MemberAccessor variableMemberAccessor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
acceptsValueType(Class<?> valueType)
void
addElement(Object entity, int index, Object element)
Object
getElement(Object entity, int index)
int
getListSize(Object entity)
List<Object>
getListVariable(Object entity)
boolean
isChained()
boolean
isGenuineListVariable()
boolean
isInitialized(Object entity)
Anullable
planning variable andPlanningListVariable
are always considered initialized.boolean
isListVariable()
boolean
isNullable()
protected void
processPropertyAnnotations(DescriptorPolicy descriptorPolicy)
protected void
processValueRangeRefs(DescriptorPolicy descriptorPolicy, String[] valueRangeProviderRefs)
Object
removeElement(Object entity, int index)
Object
setElement(Object entity, int index, Object element)
-
Methods inherited from class org.optaplanner.core.impl.domain.variable.descriptor.GenuineVariableDescriptor
getDecreasingStrengthSorter, getIncreasingStrengthSorter, getMovableChainedTrailingValueFilter, getValueCount, getValueRangeDescriptor, hasMovableChainedTrailingValueFilter, isGenuineAndUninitialized, isReinitializable, isValueRangeEntityIndependent, linkVariableDescriptors, processAnnotations, processStrength, toString
-
Methods inherited from class org.optaplanner.core.impl.domain.variable.descriptor.VariableDescriptor
getEntityDescriptor, getMemberAccessorSpeedNote, getSimpleEntityAndVariableName, getSinkVariableDescriptorList, getValue, getVariableName, getVariablePropertyType, isValuePotentialAnchor, registerSinkVariableDescriptor, setValue
-
-
-
-
Constructor Detail
-
ListVariableDescriptor
public ListVariableDescriptor(EntityDescriptor<Solution_> entityDescriptor, MemberAccessor variableMemberAccessor)
-
-
Method Detail
-
processPropertyAnnotations
protected void processPropertyAnnotations(DescriptorPolicy descriptorPolicy)
- Specified by:
processPropertyAnnotations
in classGenuineVariableDescriptor<Solution_>
-
processValueRangeRefs
protected void processValueRangeRefs(DescriptorPolicy descriptorPolicy, String[] valueRangeProviderRefs)
- Overrides:
processValueRangeRefs
in classGenuineVariableDescriptor<Solution_>
-
isGenuineListVariable
public boolean isGenuineListVariable()
- Overrides:
isGenuineListVariable
in classVariableDescriptor<Solution_>
-
isListVariable
public boolean isListVariable()
- Specified by:
isListVariable
in classGenuineVariableDescriptor<Solution_>
-
isChained
public boolean isChained()
- Specified by:
isChained
in classGenuineVariableDescriptor<Solution_>
-
isNullable
public boolean isNullable()
- Specified by:
isNullable
in classGenuineVariableDescriptor<Solution_>
-
acceptsValueType
public boolean acceptsValueType(Class<?> valueType)
- Specified by:
acceptsValueType
in classGenuineVariableDescriptor<Solution_>
-
isInitialized
public boolean isInitialized(Object entity)
Description copied from class:GenuineVariableDescriptor
Anullable
planning variable andPlanningListVariable
are always considered initialized.- Specified by:
isInitialized
in classGenuineVariableDescriptor<Solution_>
- Parameters:
entity
- never null- Returns:
- true if the variable on that entity is initialized
-
getListSize
public int getListSize(Object entity)
-
-