org.optaplanner.core.impl.domain.entity.descriptor

## Class EntityDescriptor<Solution_>

- java.lang.Object
- - org.optaplanner.core.impl.domain.entity.descriptor.EntityDescriptor<Solution_>

- Type Parameters:
    `Solution_` - the solution type, the class with the `PlanningSolution` annotation

      public class EntityDescriptor<Solution_>
      extends Object

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static Class[]` | `VARIABLE_ANNOTATION_CLASSES`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `EntityDescriptor(SolutionDescriptor<Solution_> solutionDescriptor, Class<?> entityClass)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `buildInvalidVariableNameExceptionMessage(String variableName)`
    `int` | `countReinitializableVariables(ScoreDirector<Solution_> scoreDirector, Object entity)`
    `int` | `countUninitializedVariables(Object entity)`
    `List<Object>` | `extractEntities(Solution_ solution)`
    `Collection<GenuineVariableDescriptor<Solution_>>` | `getDeclaredGenuineVariableDescriptors()`
    `Collection<ShadowVariableDescriptor<Solution_>>` | `getDeclaredShadowVariableDescriptors()`
    `Collection<VariableDescriptor<Solution_>>` | `getDeclaredVariableDescriptors()`
    `SelectionSorter` | `getDecreasingDifficultySorter()`
    `SelectionFilter` | `getEffectiveMovableEntitySelectionFilter()`
    `Class<?>` | `getEntityClass()`
    `long` | `getGenuineVariableCount()`
    `GenuineVariableDescriptor<Solution_>` | `getGenuineVariableDescriptor(String variableName)`
    `List<GenuineVariableDescriptor<Solution_>>` | `getGenuineVariableDescriptorList()`
    `Map<String,GenuineVariableDescriptor<Solution_>>` | `getGenuineVariableDescriptorMap()`
    `Collection<GenuineVariableDescriptor<Solution_>>` | `getGenuineVariableDescriptors()`
    `Collection<String>` | `getGenuineVariableNameSet()`
    `Predicate<Object>` | `getIsInitializedPredicate()` Using entityDescriptor::isInitialized directly breaks node sharing because it creates multiple instances of this `Predicate`.
    `long` | `getMaximumValueCount(Solution_ solution, Object entity)`
    `long` | `getProblemScale(Solution_ solution, Object entity)`
    `ShadowVariableDescriptor<Solution_>` | `getShadowVariableDescriptor(String variableName)`
    `Map<String,ShadowVariableDescriptor<Solution_>>` | `getShadowVariableDescriptorMap()`
    `Collection<ShadowVariableDescriptor<Solution_>>` | `getShadowVariableDescriptors()`
    `SolutionDescriptor<Solution_>` | `getSolutionDescriptor()`
    `VariableDescriptor<Solution_>` | `getVariableDescriptor(String variableName)`
    `Map<String,VariableDescriptor<Solution_>>` | `getVariableDescriptorMap()`
    `Collection<VariableDescriptor<Solution_>>` | `getVariableDescriptors()`
    `boolean` | `hasAnyChainedGenuineVariables()`
    `boolean` | `hasAnyDeclaredGenuineVariableDescriptor()`
    `boolean` | `hasAnyGenuineVariables()`
    `boolean` | `hasEffectiveMovableEntitySelectionFilter()`
    `boolean` | `hasGenuineVariableDescriptor(String variableName)`
    `boolean` | `hasShadowVariableDescriptor(String variableName)`
    `boolean` | `hasVariableDescriptor(String variableName)`
    `boolean` | `isEntityInitializedOrImmovable(ScoreDirector<Solution_> scoreDirector, Object entity)`
    `boolean` | `isInitialized(Object entity)`
    `boolean` | `isMovable(ScoreDirector<Solution_> scoreDirector, Object entity)`
    `void` | `linkEntityDescriptors(DescriptorPolicy descriptorPolicy)`
    `void` | `linkVariableDescriptors(DescriptorPolicy descriptorPolicy)`
    `boolean` | `matchesEntity(Object entity)`
    `void` | `processAnnotations(DescriptorPolicy descriptorPolicy)`
    `String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### VARIABLE_ANNOTATION_CLASSES

          public static final Class[] VARIABLE_ANNOTATION_CLASSES

  - ### Constructor Detail

    - #### EntityDescriptor

          public EntityDescriptor(SolutionDescriptor<Solution_> solutionDescriptor,
                                  Class<?> entityClass)

  - ### Method Detail

    - #### getIsInitializedPredicate

          public Predicate<Object> getIsInitializedPredicate()

      Using entityDescriptor::isInitialized directly breaks node sharing because it creates multiple instances of this `Predicate`.
      Returns:
        never null, always the same `Predicate` instance to `isInitialized(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 getEffectiveMovableEntitySelectionFilter()

    - #### getDecreasingDifficultySorter

          public SelectionSorter getDecreasingDifficultySorter()

    - #### hasAnyDeclaredGenuineVariableDescriptor

          public boolean hasAnyDeclaredGenuineVariableDescriptor()

    - #### getGenuineVariableNameSet

          public Collection<String> getGenuineVariableNameSet()

    - #### getGenuineVariableDescriptorMap

          public Map<String,GenuineVariableDescriptor<Solution_>> getGenuineVariableDescriptorMap()

    - #### getGenuineVariableDescriptors

          public Collection<GenuineVariableDescriptor<Solution_>> getGenuineVariableDescriptors()

    - #### 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()

    - #### extractEntities

          public List<Object> extractEntities(Solution_ solution)

    - #### getGenuineVariableCount

          public long getGenuineVariableCount()

    - #### getMaximumValueCount

          public long getMaximumValueCount(Solution_ solution,
                                           Object entity)

    - #### getProblemScale

          public long getProblemScale(Solution_ solution,
                                      Object entity)

    - #### countUninitializedVariables

          public int countUninitializedVariables(Object entity)

    - #### isInitialized

          public boolean isInitialized(Object entity)

    - #### countReinitializableVariables

          public int countReinitializableVariables(ScoreDirector<Solution_> scoreDirector,
                                                   Object entity)

    - #### isMovable

          public boolean isMovable(ScoreDirector<Solution_> scoreDirector,
                                   Object entity)

    - #### isEntityInitializedOrImmovable

          public boolean isEntityInitializedOrImmovable(ScoreDirector<Solution_> scoreDirector,
                                                        Object entity)

      Parameters:
        `scoreDirector` - never null
        `entity` - never null
      Returns:
        true if the entity is initialized or immovable

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

Copyright © 2006–2020 JBoss by Red Hat. All rights reserved.