Class ValueSelectorConfig
- java.lang.Object
-
- org.optaplanner.core.config.AbstractConfig<Config_>
-
- org.optaplanner.core.config.heuristic.selector.SelectorConfig<ValueSelectorConfig>
-
- org.optaplanner.core.config.heuristic.selector.value.ValueSelectorConfig
-
public class ValueSelectorConfig extends SelectorConfig<ValueSelectorConfig>
-
-
Field Summary
Fields Modifier and Type Field Description protected SelectionCacheType
cacheType
protected Class<?>
downcastEntityClass
protected Class<? extends SelectionFilter>
filterClass
protected String
id
protected String
mimicSelectorRef
protected NearbySelectionConfig
nearbySelectionConfig
protected Class<? extends SelectionProbabilityWeightFactory>
probabilityWeightFactoryClass
protected Long
selectedCountLimit
protected SelectionOrder
selectionOrder
protected Class<? extends SelectionSorter>
sorterClass
protected Class<? extends Comparator>
sorterComparatorClass
protected ValueSorterManner
sorterManner
protected SelectionSorterOrder
sorterOrder
protected Class<? extends SelectionSorterWeightFactory>
sorterWeightFactoryClass
protected String
variableName
-
Constructor Summary
Constructors Constructor Description ValueSelectorConfig()
ValueSelectorConfig(String variableName)
ValueSelectorConfig(ValueSelectorConfig inheritedConfig)
-
Method Summary
-
-
-
Field Detail
-
id
protected String id
-
mimicSelectorRef
protected String mimicSelectorRef
-
downcastEntityClass
protected Class<?> downcastEntityClass
-
variableName
protected String variableName
-
cacheType
protected SelectionCacheType cacheType
-
selectionOrder
protected SelectionOrder selectionOrder
-
nearbySelectionConfig
protected NearbySelectionConfig nearbySelectionConfig
-
filterClass
protected Class<? extends SelectionFilter> filterClass
-
sorterManner
protected ValueSorterManner sorterManner
-
sorterComparatorClass
protected Class<? extends Comparator> sorterComparatorClass
-
sorterWeightFactoryClass
protected Class<? extends SelectionSorterWeightFactory> sorterWeightFactoryClass
-
sorterOrder
protected SelectionSorterOrder sorterOrder
-
sorterClass
protected Class<? extends SelectionSorter> sorterClass
-
probabilityWeightFactoryClass
protected Class<? extends SelectionProbabilityWeightFactory> probabilityWeightFactoryClass
-
selectedCountLimit
protected Long selectedCountLimit
-
-
Constructor Detail
-
ValueSelectorConfig
public ValueSelectorConfig()
-
ValueSelectorConfig
public ValueSelectorConfig(String variableName)
-
ValueSelectorConfig
public ValueSelectorConfig(ValueSelectorConfig inheritedConfig)
-
-
Method Detail
-
getId
public String getId()
-
setId
public void setId(String id)
-
getMimicSelectorRef
public String getMimicSelectorRef()
-
setMimicSelectorRef
public void setMimicSelectorRef(String mimicSelectorRef)
-
getDowncastEntityClass
public Class<?> getDowncastEntityClass()
-
setDowncastEntityClass
public void setDowncastEntityClass(Class<?> downcastEntityClass)
-
getVariableName
public String getVariableName()
-
setVariableName
public void setVariableName(String variableName)
-
getCacheType
public SelectionCacheType getCacheType()
-
setCacheType
public void setCacheType(SelectionCacheType cacheType)
-
getSelectionOrder
public SelectionOrder getSelectionOrder()
-
setSelectionOrder
public void setSelectionOrder(SelectionOrder selectionOrder)
-
getNearbySelectionConfig
public NearbySelectionConfig getNearbySelectionConfig()
-
setNearbySelectionConfig
public void setNearbySelectionConfig(NearbySelectionConfig nearbySelectionConfig)
-
getFilterClass
public Class<? extends SelectionFilter> getFilterClass()
-
setFilterClass
public void setFilterClass(Class<? extends SelectionFilter> filterClass)
-
getSorterManner
public ValueSorterManner getSorterManner()
-
setSorterManner
public void setSorterManner(ValueSorterManner sorterManner)
-
getSorterComparatorClass
public Class<? extends Comparator> getSorterComparatorClass()
-
setSorterComparatorClass
public void setSorterComparatorClass(Class<? extends Comparator> sorterComparatorClass)
-
getSorterWeightFactoryClass
public Class<? extends SelectionSorterWeightFactory> getSorterWeightFactoryClass()
-
setSorterWeightFactoryClass
public void setSorterWeightFactoryClass(Class<? extends SelectionSorterWeightFactory> sorterWeightFactoryClass)
-
getSorterOrder
public SelectionSorterOrder getSorterOrder()
-
setSorterOrder
public void setSorterOrder(SelectionSorterOrder sorterOrder)
-
getSorterClass
public Class<? extends SelectionSorter> getSorterClass()
-
setSorterClass
public void setSorterClass(Class<? extends SelectionSorter> sorterClass)
-
getProbabilityWeightFactoryClass
public Class<? extends SelectionProbabilityWeightFactory> getProbabilityWeightFactoryClass()
-
setProbabilityWeightFactoryClass
public void setProbabilityWeightFactoryClass(Class<? extends SelectionProbabilityWeightFactory> probabilityWeightFactoryClass)
-
getSelectedCountLimit
public Long getSelectedCountLimit()
-
setSelectedCountLimit
public void setSelectedCountLimit(Long selectedCountLimit)
-
inherit
public ValueSelectorConfig inherit(ValueSelectorConfig inheritedConfig)
Description copied from class:AbstractConfig
Inherits each property of theinheritedConfig
unless that property (or a semantic alternative) is defined by this instance (which overwrites the inherited behaviour).After the inheritance, if a property on this
AbstractConfig
composition is replaced, it should not affect the inherited composition instance.- Specified by:
inherit
in classAbstractConfig<ValueSelectorConfig>
- Parameters:
inheritedConfig
- never null- Returns:
- this
-
copyConfig
public ValueSelectorConfig copyConfig()
Description copied from class:AbstractConfig
Typically implemented by constructing a new instance and callingAbstractConfig.inherit(AbstractConfig)
on it- Specified by:
copyConfig
in classAbstractConfig<ValueSelectorConfig>
- Returns:
- new instance
-
visitReferencedClasses
public void visitReferencedClasses(Consumer<Class<?>> classVisitor)
Description copied from class:AbstractConfig
Call 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:
visitReferencedClasses
in classAbstractConfig<ValueSelectorConfig>
- Parameters:
classVisitor
- The visitor of classes, never null. Can accept null instances of Class
-
toString
public String toString()
- Overrides:
toString
in 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)
-
-