Class ValueSelectorConfig
java.lang.Object
ai.timefold.solver.core.config.AbstractConfig<Config_>
ai.timefold.solver.core.config.heuristic.selector.SelectorConfig<ValueSelectorConfig>
ai.timefold.solver.core.config.heuristic.selector.value.ValueSelectorConfig
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected @Nullable SelectionCacheTypeprotected @Nullable Class<? extends Comparator>protected @Nullable Class<? extends ComparatorFactory>protected @Nullable Class<?>protected @Nullable Class<? extends SelectionFilter>protected @Nullable Stringprotected @Nullable Stringprotected @Nullable NearbySelectionConfigprotected @Nullable Class<? extends SelectionProbabilityWeightFactory>protected @Nullable Longprotected @Nullable SelectionOrderprotected @Nullable Class<? extends SelectionSorter>protected @Nullable Class<? extends Comparator>Deprecated, for removal: This API element is subject to removal in a future version.protected @Nullable ValueSorterMannerprotected @Nullable SelectionSorterOrderprotected @Nullable Class<? extends SelectionSorterWeightFactory>Deprecated, for removal: This API element is subject to removal in a future version.Deprecated in favor ofcomparatorFactoryClass.protected @Nullable String -
Constructor Summary
ConstructorsConstructorDescriptionValueSelectorConfig(@Nullable ValueSelectorConfig inheritedConfig) ValueSelectorConfig(String variableName) -
Method Summary
Modifier and TypeMethodDescriptionTypically implemented by constructing a new instance and callingAbstractConfig.inherit(AbstractConfig)on it.static <Solution_>
SelectionSorter<Solution_,Object> determineSorter(ValueSorterManner valueSorterManner, GenuineVariableDescriptor<Solution_> variableDescriptor) @Nullable SelectionCacheType@Nullable Class<? extends Comparator>@Nullable Class<? extends ComparatorFactory>@Nullable Class<?>@Nullable Class<? extends SelectionFilter>@Nullable StringgetId()@Nullable String@Nullable NearbySelectionConfig@Nullable Class<? extends SelectionProbabilityWeightFactory>@Nullable Long@Nullable SelectionOrder@Nullable Class<? extends SelectionSorter>@Nullable Class<? extends Comparator>Deprecated, for removal: This API element is subject to removal in a future version.Deprecated in favor ofgetComparatorClass()@Nullable ValueSorterManner@Nullable SelectionSorterOrder@Nullable Class<? extends SelectionSorterWeightFactory>Deprecated, for removal: This API element is subject to removal in a future version.Deprecated in favor ofgetComparatorFactoryClass()@Nullable StringbooleanVerifies if the current configuration has any Nearby Selection settings.static <Solution_>
booleanhasSorter(ValueSorterManner valueSorterManner, GenuineVariableDescriptor<Solution_> variableDescriptor) inherit(ValueSelectorConfig inheritedConfig) Inherits each property of theinheritedConfigunless that property (or a semantic alternative) is defined by this instance (which overwrites the inherited behaviour).voidsetCacheType(@Nullable SelectionCacheType cacheType) voidsetComparatorClass(@Nullable Class<? extends Comparator> comparatorClass) voidsetComparatorFactoryClass(@Nullable Class<? extends ComparatorFactory> comparatorFactoryClass) voidsetDowncastEntityClass(@Nullable Class<?> downcastEntityClass) voidsetFilterClass(@Nullable Class<? extends SelectionFilter> filterClass) voidvoidsetMimicSelectorRef(@Nullable String mimicSelectorRef) voidsetNearbySelectionConfig(@Nullable NearbySelectionConfig nearbySelectionConfig) voidsetProbabilityWeightFactoryClass(@Nullable Class<? extends SelectionProbabilityWeightFactory> probabilityWeightFactoryClass) voidsetSelectedCountLimit(@Nullable Long selectedCountLimit) voidsetSelectionOrder(@Nullable SelectionOrder selectionOrder) voidsetSorterClass(@Nullable Class<? extends SelectionSorter> sorterClass) voidsetSorterComparatorClass(@Nullable Class<? extends Comparator> sorterComparatorClass) Deprecated, for removal: This API element is subject to removal in a future version.Deprecated in favor ofsetComparatorClass(Class)voidsetSorterManner(@Nullable ValueSorterManner sorterManner) voidsetSorterOrder(@Nullable SelectionSorterOrder sorterOrder) voidsetSorterWeightFactoryClass(@Nullable Class<? extends SelectionSorterWeightFactory> sorterWeightFactoryClass) Deprecated, for removal: This API element is subject to removal in a future version.Deprecated in favor ofsetComparatorFactoryClass(Class)voidsetVariableName(@Nullable String variableName) toString()voidvisitReferencedClasses(Consumer<Class<?>> classVisitor) Call the class visitor on each (possibly null) Class instance provided to this config by the user (including those provided in child configs).withCacheType(SelectionCacheType cacheType) withComparatorClass(Class<? extends Comparator> comparatorClass) withComparatorFactoryClass(Class<? extends ComparatorFactory> comparatorFactoryClass) withDowncastEntityClass(Class<?> entityClass) withFilterClass(Class<? extends SelectionFilter> filterClass) withMimicSelectorRef(String mimicSelectorRef) withNearbySelectionConfig(NearbySelectionConfig nearbySelectionConfig) withProbabilityWeightFactoryClass(Class<? extends SelectionProbabilityWeightFactory> factoryClass) withSelectedCountLimit(long selectedCountLimit) withSelectionOrder(SelectionOrder selectionOrder) withSorterClass(Class<? extends SelectionSorter> sorterClass) withSorterComparatorClass(Class<? extends Comparator> comparatorClass) Deprecated, for removal: This API element is subject to removal in a future version.Deprecated in favor ofwithComparatorClass(Class)withSorterManner(ValueSorterManner sorterManner) withSorterOrder(SelectionSorterOrder sorterOrder) withSorterWeightFactoryClass(Class<? extends SelectionSorterWeightFactory> weightFactoryClass) Deprecated, for removal: This API element is subject to removal in a future version.Deprecated in favor ofwithComparatorFactoryClass(Class)withVariableName(String variableName)
-
Field Details
-
id
-
mimicSelectorRef
-
downcastEntityClass
-
variableName
-
cacheType
-
selectionOrder
-
nearbySelectionConfig
-
filterClass
-
sorterManner
-
sorterComparatorClass
@Deprecated(forRemoval=true, since="1.28.0") protected @Nullable Class<? extends Comparator> sorterComparatorClassDeprecated, for removal: This API element is subject to removal in a future version.Deprecated in favor ofcomparatorClass. -
comparatorClass
-
sorterWeightFactoryClass
@Deprecated(forRemoval=true, since="1.28.0") protected @Nullable Class<? extends SelectionSorterWeightFactory> sorterWeightFactoryClassDeprecated, for removal: This API element is subject to removal in a future version.Deprecated in favor ofcomparatorFactoryClass. -
comparatorFactoryClass
-
sorterOrder
-
sorterClass
-
probabilityWeightFactoryClass
protected @Nullable Class<? extends SelectionProbabilityWeightFactory> probabilityWeightFactoryClass -
selectedCountLimit
-
-
Constructor Details
-
ValueSelectorConfig
public ValueSelectorConfig() -
ValueSelectorConfig
-
ValueSelectorConfig
-
-
Method Details
-
getId
-
setId
-
getMimicSelectorRef
-
setMimicSelectorRef
-
getDowncastEntityClass
-
setDowncastEntityClass
-
getVariableName
-
setVariableName
-
getCacheType
-
setCacheType
-
getSelectionOrder
-
setSelectionOrder
-
getNearbySelectionConfig
-
setNearbySelectionConfig
-
getFilterClass
-
setFilterClass
-
getSorterManner
-
setSorterManner
-
getSorterComparatorClass
@Deprecated(forRemoval=true, since="1.28.0") public @Nullable Class<? extends Comparator> getSorterComparatorClass()Deprecated, for removal: This API element is subject to removal in a future version.Deprecated in favor ofgetComparatorClass() -
setSorterComparatorClass
@Deprecated(forRemoval=true, since="1.28.0") public void setSorterComparatorClass(@Nullable Class<? extends Comparator> sorterComparatorClass) Deprecated, for removal: This API element is subject to removal in a future version.Deprecated in favor ofsetComparatorClass(Class) -
getComparatorClass
-
setComparatorClass
-
getSorterWeightFactoryClass
@Deprecated(forRemoval=true, since="1.28.0") public @Nullable Class<? extends SelectionSorterWeightFactory> getSorterWeightFactoryClass()Deprecated, for removal: This API element is subject to removal in a future version.Deprecated in favor ofgetComparatorFactoryClass() -
setSorterWeightFactoryClass
@Deprecated(forRemoval=true, since="1.28.0") public void setSorterWeightFactoryClass(@Nullable Class<? extends SelectionSorterWeightFactory> sorterWeightFactoryClass) Deprecated, for removal: This API element is subject to removal in a future version.Deprecated in favor ofsetComparatorFactoryClass(Class)- Parameters:
sorterWeightFactoryClass- the class
-
getComparatorFactoryClass
-
setComparatorFactoryClass
public void setComparatorFactoryClass(@Nullable Class<? extends ComparatorFactory> comparatorFactoryClass) -
getSorterOrder
-
setSorterOrder
-
getSorterClass
-
setSorterClass
-
getProbabilityWeightFactoryClass
public @Nullable Class<? extends SelectionProbabilityWeightFactory> getProbabilityWeightFactoryClass() -
setProbabilityWeightFactoryClass
public void setProbabilityWeightFactoryClass(@Nullable Class<? extends SelectionProbabilityWeightFactory> probabilityWeightFactoryClass) -
getSelectedCountLimit
-
setSelectedCountLimit
-
withId
-
withMimicSelectorRef
-
withDowncastEntityClass
-
withVariableName
-
withCacheType
-
withSelectionOrder
-
withNearbySelectionConfig
-
withFilterClass
-
withSorterManner
-
withSorterComparatorClass
@Deprecated(forRemoval=true, since="1.28.0") public ValueSelectorConfig withSorterComparatorClass(Class<? extends Comparator> comparatorClass) Deprecated, for removal: This API element is subject to removal in a future version.Deprecated in favor ofwithComparatorClass(Class) -
withComparatorClass
-
withSorterWeightFactoryClass
@Deprecated(forRemoval=true, since="1.28.0") public ValueSelectorConfig withSorterWeightFactoryClass(Class<? extends SelectionSorterWeightFactory> weightFactoryClass) Deprecated, for removal: This API element is subject to removal in a future version.Deprecated in favor ofwithComparatorFactoryClass(Class)- Parameters:
weightFactoryClass- the factory class
-
withComparatorFactoryClass
public ValueSelectorConfig withComparatorFactoryClass(Class<? extends ComparatorFactory> comparatorFactoryClass) -
withSorterOrder
-
withSorterClass
-
withProbabilityWeightFactoryClass
public ValueSelectorConfig withProbabilityWeightFactoryClass(Class<? extends SelectionProbabilityWeightFactory> factoryClass) -
withSelectedCountLimit
-
inherit
Description copied from class:AbstractConfigInherits each property of theinheritedConfigunless that property (or a semantic alternative) is defined by this instance (which overwrites the inherited behaviour).After the inheritance, if a property on this
AbstractConfigcomposition is replaced, it should not affect the inherited composition instance.- Specified by:
inheritin classAbstractConfig<ValueSelectorConfig>- Returns:
- this
-
copyConfig
Description copied from class:AbstractConfigTypically implemented by constructing a new instance and callingAbstractConfig.inherit(AbstractConfig)on it.- Specified by:
copyConfigin classAbstractConfig<ValueSelectorConfig>- Returns:
- new instance
-
visitReferencedClasses
Description copied from class:AbstractConfigCall the class visitor on each (possibly null) Class instance provided to this config by the user (including those provided in child configs). Required to create the bean factory in Quarkus.- Specified by:
visitReferencedClassesin classAbstractConfig<ValueSelectorConfig>- Parameters:
classVisitor- The visitor of classes. Can accept null instances of Class.
-
toString
- Overrides:
toStringin classAbstractConfig<ValueSelectorConfig>
-
hasSorter
public static <Solution_> boolean hasSorter(ValueSorterManner valueSorterManner, GenuineVariableDescriptor<Solution_> variableDescriptor) -
determineSorter
public static <Solution_> SelectionSorter<Solution_,Object> determineSorter(ValueSorterManner valueSorterManner, GenuineVariableDescriptor<Solution_> variableDescriptor) -
hasNearbySelectionConfig
public boolean hasNearbySelectionConfig()Description copied from class:SelectorConfigVerifies if the current configuration has any Nearby Selection settings.- Specified by:
hasNearbySelectionConfigin classSelectorConfig<ValueSelectorConfig>
-
comparatorClass.