Class VariableDescriptor<Solution_>
- java.lang.Object
-
- org.optaplanner.core.impl.domain.variable.descriptor.VariableDescriptor<Solution_>
-
- Type Parameters:
Solution_
- the solution type, the class with thePlanningSolution
annotation
- Direct Known Subclasses:
GenuineVariableDescriptor
,ShadowVariableDescriptor
public abstract class VariableDescriptor<Solution_> extends Object
-
-
Field Summary
Fields Modifier and Type Field Description protected EntityDescriptor<Solution_>
entityDescriptor
protected List<ShadowVariableDescriptor<Solution_>>
sinkVariableDescriptorList
protected MemberAccessor
variableMemberAccessor
protected String
variableName
-
Constructor Summary
Constructors Constructor Description VariableDescriptor(EntityDescriptor<Solution_> entityDescriptor, MemberAccessor variableMemberAccessor)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description EntityDescriptor<Solution_>
getEntityDescriptor()
String
getMemberAccessorSpeedNote()
String
getSimpleEntityAndVariableName()
List<ShadowVariableDescriptor<Solution_>>
getSinkVariableDescriptorList()
Object
getValue(Object entity)
String
getVariableName()
Class<?>
getVariablePropertyType()
abstract boolean
isGenuineAndUninitialized(Object entity)
boolean
isGenuineListVariable()
boolean
isValuePotentialAnchor(Object value)
abstract void
linkVariableDescriptors(DescriptorPolicy descriptorPolicy)
void
registerSinkVariableDescriptor(ShadowVariableDescriptor<Solution_> shadowVariableDescriptor)
void
setValue(Object entity, Object value)
-
-
-
Field Detail
-
entityDescriptor
protected final EntityDescriptor<Solution_> entityDescriptor
-
variableMemberAccessor
protected final MemberAccessor variableMemberAccessor
-
variableName
protected final String variableName
-
sinkVariableDescriptorList
protected List<ShadowVariableDescriptor<Solution_>> sinkVariableDescriptorList
-
-
Constructor Detail
-
VariableDescriptor
public VariableDescriptor(EntityDescriptor<Solution_> entityDescriptor, MemberAccessor variableMemberAccessor)
-
-
Method Detail
-
getEntityDescriptor
public EntityDescriptor<Solution_> getEntityDescriptor()
-
getVariableName
public String getVariableName()
-
getSimpleEntityAndVariableName
public String getSimpleEntityAndVariableName()
-
getVariablePropertyType
public Class<?> getVariablePropertyType()
-
linkVariableDescriptors
public abstract void linkVariableDescriptors(DescriptorPolicy descriptorPolicy)
-
isGenuineListVariable
public boolean isGenuineListVariable()
-
registerSinkVariableDescriptor
public void registerSinkVariableDescriptor(ShadowVariableDescriptor<Solution_> shadowVariableDescriptor)
-
getSinkVariableDescriptorList
public List<ShadowVariableDescriptor<Solution_>> getSinkVariableDescriptorList()
- Returns:
- never null, only direct shadow variables that are affected by this variable
-
isValuePotentialAnchor
public boolean isValuePotentialAnchor(Object value)
- Parameters:
value
- never null- Returns:
- true if it might be an anchor, false if it is definitely not an anchor
-
getMemberAccessorSpeedNote
public String getMemberAccessorSpeedNote()
-
isGenuineAndUninitialized
public abstract boolean isGenuineAndUninitialized(Object entity)
-
-