Class GenuineVariableDescriptor<Solution_>

java.lang.Object
org.optaplanner.core.impl.domain.variable.descriptor.VariableDescriptor<Solution_>
org.optaplanner.core.impl.domain.variable.descriptor.GenuineVariableDescriptor<Solution_>
Type Parameters:
Solution_ - the solution type, the class with the PlanningSolution annotation
Direct Known Subclasses:
BasicVariableDescriptor, ListVariableDescriptor

public abstract class GenuineVariableDescriptor<Solution_> extends VariableDescriptor<Solution_>
  • Constructor Details

  • Method Details

    • processAnnotations

      public void processAnnotations(DescriptorPolicy descriptorPolicy)
    • processPropertyAnnotations

      protected abstract void processPropertyAnnotations(DescriptorPolicy descriptorPolicy)
    • processValueRangeRefs

      protected void processValueRangeRefs(DescriptorPolicy descriptorPolicy, String[] valueRangeProviderRefs)
    • processStrength

      protected void processStrength(Class<? extends Comparator> strengthComparatorClass, Class<? extends SelectionSorterWeightFactory> strengthWeightFactoryClass)
    • linkVariableDescriptors

      public void linkVariableDescriptors(DescriptorPolicy descriptorPolicy)
      Specified by:
      linkVariableDescriptors in class VariableDescriptor<Solution_>
    • isListVariable

      public abstract boolean isListVariable()
    • isChained

      public abstract boolean isChained()
    • isNullable

      public abstract boolean isNullable()
    • acceptsValueType

      public abstract boolean acceptsValueType(Class<?> valueType)
    • hasMovableChainedTrailingValueFilter

      public boolean hasMovableChainedTrailingValueFilter()
    • getMovableChainedTrailingValueFilter

      public SelectionFilter<Solution_,Object> getMovableChainedTrailingValueFilter()
    • getValueRangeDescriptor

      public ValueRangeDescriptor<Solution_> getValueRangeDescriptor()
    • isValueRangeEntityIndependent

      public boolean isValueRangeEntityIndependent()
    • isInitialized

      public abstract boolean isInitialized(Object entity)
      A nullable planning variable and PlanningListVariable are always considered initialized.
      Parameters:
      entity - never null
      Returns:
      true if the variable on that entity is initialized
    • isGenuineAndUninitialized

      public boolean isGenuineAndUninitialized(Object entity)
      Specified by:
      isGenuineAndUninitialized in class VariableDescriptor<Solution_>
    • isReinitializable

      public boolean isReinitializable(Object entity)
      Decides whether an entity is eligible for initialization. This is not an opposite of isInitialized() because even a PlanningVariable.nullable() variable, which is always considered initialized, is reinitializable if its value is null.
    • getIncreasingStrengthSorter

      public SelectionSorter<Solution_,Object> getIncreasingStrengthSorter()
    • getDecreasingStrengthSorter

      public SelectionSorter<Solution_,Object> getDecreasingStrengthSorter()
    • getValueCount

      public long getValueCount(Solution_ solution, Object entity)
    • toString

      public String toString()
      Overrides:
      toString in class Object