Class EntitySelectorConfig
java.lang.Object
org.optaplanner.core.config.AbstractConfig<Config_>
org.optaplanner.core.config.heuristic.selector.SelectorConfig<EntitySelectorConfig>
org.optaplanner.core.config.heuristic.selector.entity.EntitySelectorConfig
-
Field Summary
Modifier and TypeFieldDescriptionprotected SelectionCacheType
protected Class<?>
protected Class<? extends SelectionFilter>
protected String
protected String
protected NearbySelectionConfig
protected Class<? extends SelectionProbabilityWeightFactory>
protected Long
protected SelectionOrder
protected Class<? extends SelectionSorter>
protected Class<? extends Comparator>
protected EntitySorterManner
protected SelectionSorterOrder
protected Class<? extends SelectionSorterWeightFactory>
-
Constructor Summary
ConstructorDescriptionEntitySelectorConfig
(Class<?> entityClass) EntitySelectorConfig
(EntitySelectorConfig inheritedConfig) -
Method Summary
Modifier and TypeMethodDescriptionTypically implemented by constructing a new instance and callingAbstractConfig.inherit(AbstractConfig)
on it.static <Solution_,
T>
SelectionSorter<Solution_,T> determineSorter
(EntitySorterManner entitySorterManner, EntityDescriptor<Solution_> entityDescriptor) Class<?>
Class<? extends SelectionFilter>
getId()
Class<? extends SelectionProbabilityWeightFactory>
Class<? extends SelectionSorter>
Class<? extends Comparator>
Class<? extends SelectionSorterWeightFactory>
static <Solution_>
booleanhasSorter
(EntitySorterManner entitySorterManner, EntityDescriptor<Solution_> entityDescriptor) inherit
(EntitySelectorConfig inheritedConfig) Inherits each property of theinheritedConfig
unless that property (or a semantic alternative) is defined by this instance (which overwrites the inherited behaviour).static EntitySelectorConfig
newMimicSelectorConfig
(String mimicSelectorRef) void
setCacheType
(SelectionCacheType cacheType) void
setEntityClass
(Class<?> entityClass) void
setFilterClass
(Class<? extends SelectionFilter> filterClass) void
void
setMimicSelectorRef
(String mimicSelectorRef) void
setNearbySelectionConfig
(NearbySelectionConfig nearbySelectionConfig) void
setProbabilityWeightFactoryClass
(Class<? extends SelectionProbabilityWeightFactory> probabilityWeightFactoryClass) void
setSelectedCountLimit
(Long selectedCountLimit) void
setSelectionOrder
(SelectionOrder selectionOrder) void
setSorterClass
(Class<? extends SelectionSorter> sorterClass) void
setSorterComparatorClass
(Class<? extends Comparator> sorterComparatorClass) void
setSorterManner
(EntitySorterManner sorterManner) void
setSorterOrder
(SelectionSorterOrder sorterOrder) void
setSorterWeightFactoryClass
(Class<? extends SelectionSorterWeightFactory> sorterWeightFactoryClass) toString()
void
visitReferencedClasses
(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) withEntityClass
(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) withSorterManner
(EntitySorterManner sorterManner) withSorterOrder
(SelectionSorterOrder sorterOrder) withSorterWeightFactoryClass
(Class<? extends SelectionSorterWeightFactory> weightFactoryClass)
-
Field Details
-
id
-
mimicSelectorRef
-
entityClass
-
cacheType
-
selectionOrder
-
nearbySelectionConfig
-
filterClass
-
sorterManner
-
sorterComparatorClass
-
sorterWeightFactoryClass
-
sorterOrder
-
sorterClass
-
probabilityWeightFactoryClass
-
selectedCountLimit
-
-
Constructor Details
-
EntitySelectorConfig
public EntitySelectorConfig() -
EntitySelectorConfig
-
EntitySelectorConfig
-
-
Method Details
-
newMimicSelectorConfig
-
getId
-
setId
-
getMimicSelectorRef
-
setMimicSelectorRef
-
getEntityClass
-
setEntityClass
-
getCacheType
-
setCacheType
-
getSelectionOrder
-
setSelectionOrder
-
getNearbySelectionConfig
-
setNearbySelectionConfig
-
getFilterClass
-
setFilterClass
-
getSorterManner
-
setSorterManner
-
getSorterComparatorClass
-
setSorterComparatorClass
-
getSorterWeightFactoryClass
-
setSorterWeightFactoryClass
public void setSorterWeightFactoryClass(Class<? extends SelectionSorterWeightFactory> sorterWeightFactoryClass) -
getSorterOrder
-
setSorterOrder
-
getSorterClass
-
setSorterClass
-
getProbabilityWeightFactoryClass
-
setProbabilityWeightFactoryClass
public void setProbabilityWeightFactoryClass(Class<? extends SelectionProbabilityWeightFactory> probabilityWeightFactoryClass) -
getSelectedCountLimit
-
setSelectedCountLimit
-
withId
-
withMimicSelectorRef
-
withEntityClass
-
withCacheType
-
withSelectionOrder
-
withNearbySelectionConfig
-
withFilterClass
-
withSorterManner
-
withSorterComparatorClass
-
withSorterWeightFactoryClass
public EntitySelectorConfig withSorterWeightFactoryClass(Class<? extends SelectionSorterWeightFactory> weightFactoryClass) -
withSorterOrder
-
withSorterClass
-
withProbabilityWeightFactoryClass
public EntitySelectorConfig withProbabilityWeightFactoryClass(Class<? extends SelectionProbabilityWeightFactory> factoryClass) -
withSelectedCountLimit
-
inherit
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<EntitySelectorConfig>
- Parameters:
inheritedConfig
- never null- Returns:
- this
-
copyConfig
Description copied from class:AbstractConfig
Typically implemented by constructing a new instance and callingAbstractConfig.inherit(AbstractConfig)
on it.- Specified by:
copyConfig
in classAbstractConfig<EntitySelectorConfig>
- Returns:
- new instance
-
visitReferencedClasses
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<EntitySelectorConfig>
- Parameters:
classVisitor
- The visitor of classes, never null. Can accept null instances of Class.
-
toString
- Overrides:
toString
in classAbstractConfig<EntitySelectorConfig>
-
hasSorter
public static <Solution_> boolean hasSorter(EntitySorterManner entitySorterManner, EntityDescriptor<Solution_> entityDescriptor) -
determineSorter
public static <Solution_,T> SelectionSorter<Solution_,T> determineSorter(EntitySorterManner entitySorterManner, EntityDescriptor<Solution_> entityDescriptor)
-