Class EntityDescriptor<Solution_>
- java.lang.Object
-
- org.optaplanner.core.impl.domain.entity.descriptor.EntityDescriptor<Solution_>
-
- Type Parameters:
Solution_
- the solution type, the class with thePlanningSolution
annotation
public class EntityDescriptor<Solution_> extends Object
-
-
Constructor Summary
Constructors Constructor Description EntityDescriptor(SolutionDescriptor<Solution_> solutionDescriptor, Class<?> entityClass)
-
Method Summary
-
-
-
Constructor Detail
-
EntityDescriptor
public EntityDescriptor(SolutionDescriptor<Solution_> solutionDescriptor, Class<?> entityClass)
-
-
Method Detail
-
getIsInitializedPredicate
@Deprecated(forRemoval=true) public Predicate<Object> getIsInitializedPredicate()
Deprecated, for removal: This API element is subject to removal in a future version.in favor ofgetHasNoNullVariables()
.Using entityDescriptor::isInitialized directly breaks node sharing because it creates multiple instances of thisPredicate
.- Returns:
- never null, always the same
Predicate
instance toisInitialized(Object)
-
processAnnotations
public void processAnnotations(DescriptorPolicy descriptorPolicy)
-
linkEntityDescriptors
public void linkEntityDescriptors(DescriptorPolicy descriptorPolicy)
-
linkVariableDescriptors
public void linkVariableDescriptors(DescriptorPolicy descriptorPolicy)
-
getSolutionDescriptor
public SolutionDescriptor<Solution_> getSolutionDescriptor()
-
getEntityClass
public Class<?> getEntityClass()
-
matchesEntity
public boolean matchesEntity(Object entity)
-
hasEffectiveMovableEntitySelectionFilter
public boolean hasEffectiveMovableEntitySelectionFilter()
-
getEffectiveMovableEntitySelectionFilter
public SelectionFilter<Solution_,Object> getEffectiveMovableEntitySelectionFilter()
-
getDecreasingDifficultySorter
public SelectionSorter<Solution_,Object> getDecreasingDifficultySorter()
-
hasAnyDeclaredGenuineVariableDescriptor
public boolean hasAnyDeclaredGenuineVariableDescriptor()
-
getGenuineVariableNameSet
public Collection<String> getGenuineVariableNameSet()
-
getGenuineVariableDescriptorMap
public Map<String,GenuineVariableDescriptor<Solution_>> getGenuineVariableDescriptorMap()
-
getGenuineVariableDescriptorList
public List<GenuineVariableDescriptor<Solution_>> getGenuineVariableDescriptorList()
-
hasGenuineVariableDescriptor
public boolean hasGenuineVariableDescriptor(String variableName)
-
getGenuineVariableDescriptor
public GenuineVariableDescriptor<Solution_> getGenuineVariableDescriptor(String variableName)
-
getShadowVariableDescriptorMap
public Map<String,ShadowVariableDescriptor<Solution_>> getShadowVariableDescriptorMap()
-
getShadowVariableDescriptors
public Collection<ShadowVariableDescriptor<Solution_>> getShadowVariableDescriptors()
-
hasShadowVariableDescriptor
public boolean hasShadowVariableDescriptor(String variableName)
-
getShadowVariableDescriptor
public ShadowVariableDescriptor<Solution_> getShadowVariableDescriptor(String variableName)
-
getVariableDescriptorMap
public Map<String,VariableDescriptor<Solution_>> getVariableDescriptorMap()
-
getVariableDescriptors
public Collection<VariableDescriptor<Solution_>> getVariableDescriptors()
-
hasVariableDescriptor
public boolean hasVariableDescriptor(String variableName)
-
getVariableDescriptor
public VariableDescriptor<Solution_> getVariableDescriptor(String variableName)
-
getDeclaredGenuineVariableDescriptors
public Collection<GenuineVariableDescriptor<Solution_>> getDeclaredGenuineVariableDescriptors()
-
getDeclaredShadowVariableDescriptors
public Collection<ShadowVariableDescriptor<Solution_>> getDeclaredShadowVariableDescriptors()
-
getDeclaredVariableDescriptors
public Collection<VariableDescriptor<Solution_>> getDeclaredVariableDescriptors()
-
buildInvalidVariableNameExceptionMessage
public String buildInvalidVariableNameExceptionMessage(String variableName)
-
hasAnyGenuineVariables
public boolean hasAnyGenuineVariables()
-
hasAnyChainedGenuineVariables
public boolean hasAnyChainedGenuineVariables()
-
hasAnyListGenuineVariables
public boolean hasAnyListGenuineVariables()
-
getGenuineVariableCount
public long getGenuineVariableCount()
-
countUninitializedVariables
public int countUninitializedVariables(Object entity)
-
isInitialized
public boolean isInitialized(Object entity)
-
hasNoNullVariables
public boolean hasNoNullVariables(Object entity)
-
countReinitializableVariables
public int countReinitializableVariables(ScoreDirector<Solution_> scoreDirector, Object entity)
-
isMovable
public boolean isMovable(ScoreDirector<Solution_> scoreDirector, Object entity)
-
isEntityInitializedOrPinned
public boolean isEntityInitializedOrPinned(ScoreDirector<Solution_> scoreDirector, Object entity)
- Parameters:
scoreDirector
- never nullentity
- never null- Returns:
- true if the entity is initialized or pinned
-
-