org.optaplanner.core.impl.domain.variable.descriptor

## Class VariableDescriptor<Solution_>

- java.lang.Object
- - org.optaplanner.core.impl.domain.variable.descriptor.VariableDescriptor<Solution_>

- Type Parameters:
    `Solution_` - the solution type, the class with the `PlanningSolution` annotation
  All Implemented Interfaces:
    Serializable
  Direct Known Subclasses:
    GenuineVariableDescriptor, ShadowVariableDescriptor

      public abstract class VariableDescriptor<Solution_>
      extends Object
      implements Serializable

  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected EntityDescriptor<Solution_>` | `entityDescriptor`
    `protected List<ShadowVariableDescriptor<Solution_>>` | `sinkVariableDescriptorList`
    `protected MemberAccessor` | `variableMemberAccessor`
    `protected String` | `variableName`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `VariableDescriptor(EntityDescriptor<Solution_> entityDescriptor, MemberAccessor variableMemberAccessor)`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `EntityDescriptor<Solution_>` | `getEntityDescriptor()`
    `String` | `getMemberAccessorSpeedNote()`
    `String` | `getSimpleEntityAndVariableName()`
    `List<ShadowVariableDescriptor<Solution_>>` | `getSinkVariableDescriptorList()` Inverse of `ShadowVariableDescriptor.getSourceVariableDescriptorList()`.
    `Object` | `getValue(Object entity)`
    `String` | `getVariableName()`
    `Class<?>` | `getVariablePropertyType()`
    `abstract boolean` | `isGenuineAndUninitialized(Object entity)`
    `boolean` | `isValuePotentialAnchor(Object value)`
    `abstract void` | `linkVariableDescriptors(DescriptorPolicy descriptorPolicy)`
    `void` | `registerSinkVariableDescriptor(ShadowVariableDescriptor<Solution_> shadowVariableDescriptor)`
    `void` | `setValue(Object entity, Object value)`

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

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

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

    - #### registerSinkVariableDescriptor

          public void registerSinkVariableDescriptor(ShadowVariableDescriptor<Solution_> shadowVariableDescriptor)

    - #### getSinkVariableDescriptorList

          public List<ShadowVariableDescriptor<Solution_>> getSinkVariableDescriptorList()

      Inverse of `ShadowVariableDescriptor.getSourceVariableDescriptorList()`.
      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

    - #### getValue

          public Object getValue(Object entity)

    - #### setValue

          public void setValue(Object entity,
                               Object value)

    - #### getMemberAccessorSpeedNote

          public String getMemberAccessorSpeedNote()

    - #### isGenuineAndUninitialized

          public abstract boolean isGenuineAndUninitialized(Object entity)

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