Class CustomShadowVariableDescriptor<Solution_>
- java.lang.Object
-
- org.optaplanner.core.impl.domain.variable.descriptor.VariableDescriptor<Solution_>
-
- org.optaplanner.core.impl.domain.variable.descriptor.ShadowVariableDescriptor<Solution_>
-
- org.optaplanner.core.impl.domain.variable.custom.CustomShadowVariableDescriptor<Solution_>
-
- Type Parameters:
Solution_
- the solution type, the class with thePlanningSolution
annotation
public class CustomShadowVariableDescriptor<Solution_> extends ShadowVariableDescriptor<Solution_>
-
-
Field Summary
Fields Modifier and Type Field Description protected CustomShadowVariableDescriptor<Solution_>
refVariableDescriptor
protected List<VariableDescriptor<Solution_>>
sourceVariableDescriptorList
protected Class<? extends VariableListener>
variableListenerClass
-
Fields inherited from class org.optaplanner.core.impl.domain.variable.descriptor.VariableDescriptor
entityDescriptor, sinkVariableDescriptorList, variableMemberAccessor, variableName
-
-
Constructor Summary
Constructors Constructor Description CustomShadowVariableDescriptor(EntityDescriptor<Solution_> entityDescriptor, MemberAccessor variableMemberAccessor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description VariableListener<Solution_,?>
buildVariableListener(InnerScoreDirector<Solution_,?> scoreDirector)
Demand<Solution_,?>
getProvidedDemand()
List<VariableDescriptor<Solution_>>
getSourceVariableDescriptorList()
Class<? extends VariableListener>
getVariableListenerClass()
boolean
hasVariableListener(InnerScoreDirector<Solution_,?> scoreDirector)
boolean
isRef()
void
linkVariableDescriptors(DescriptorPolicy descriptorPolicy)
void
processAnnotations(DescriptorPolicy descriptorPolicy)
-
Methods inherited from class org.optaplanner.core.impl.domain.variable.descriptor.ShadowVariableDescriptor
getGlobalShadowOrder, isGenuineAndUninitialized, setGlobalShadowOrder, toString
-
Methods inherited from class org.optaplanner.core.impl.domain.variable.descriptor.VariableDescriptor
getEntityDescriptor, getMemberAccessorSpeedNote, getSimpleEntityAndVariableName, getSinkVariableDescriptorList, getValue, getVariableName, getVariablePropertyType, isGenuineListVariable, isValuePotentialAnchor, registerSinkVariableDescriptor, setValue
-
-
-
-
Field Detail
-
refVariableDescriptor
protected CustomShadowVariableDescriptor<Solution_> refVariableDescriptor
-
variableListenerClass
protected Class<? extends VariableListener> variableListenerClass
-
sourceVariableDescriptorList
protected List<VariableDescriptor<Solution_>> sourceVariableDescriptorList
-
-
Constructor Detail
-
CustomShadowVariableDescriptor
public CustomShadowVariableDescriptor(EntityDescriptor<Solution_> entityDescriptor, MemberAccessor variableMemberAccessor)
-
-
Method Detail
-
processAnnotations
public void processAnnotations(DescriptorPolicy descriptorPolicy)
- Specified by:
processAnnotations
in classShadowVariableDescriptor<Solution_>
-
isRef
public boolean isRef()
-
linkVariableDescriptors
public void linkVariableDescriptors(DescriptorPolicy descriptorPolicy)
- Specified by:
linkVariableDescriptors
in classVariableDescriptor<Solution_>
-
getSourceVariableDescriptorList
public List<VariableDescriptor<Solution_>> getSourceVariableDescriptorList()
Description copied from class:ShadowVariableDescriptor
- Specified by:
getSourceVariableDescriptorList
in classShadowVariableDescriptor<Solution_>
- Returns:
- never null, only variables affect this shadow variable directly
-
getVariableListenerClass
public Class<? extends VariableListener> getVariableListenerClass()
- Specified by:
getVariableListenerClass
in classShadowVariableDescriptor<Solution_>
-
getProvidedDemand
public Demand<Solution_,?> getProvidedDemand()
- Specified by:
getProvidedDemand
in classShadowVariableDescriptor<Solution_>
- Returns:
- never null
-
hasVariableListener
public boolean hasVariableListener(InnerScoreDirector<Solution_,?> scoreDirector)
- Overrides:
hasVariableListener
in classShadowVariableDescriptor<Solution_>
-
buildVariableListener
public VariableListener<Solution_,?> buildVariableListener(InnerScoreDirector<Solution_,?> scoreDirector)
- Specified by:
buildVariableListener
in classShadowVariableDescriptor<Solution_>
- Parameters:
scoreDirector
- never null- Returns:
- never null
-
-