Class EasyScoreDirectorFactoryService<Solution_,Score_ extends Score<Score_>>
java.lang.Object
org.optaplanner.core.impl.score.director.easy.EasyScoreDirectorFactoryService<Solution_,Score_>
- All Implemented Interfaces:
ScoreDirectorFactoryService<Solution_,
Score_>
public final class EasyScoreDirectorFactoryService<Solution_,Score_ extends Score<Score_>>
extends Object
implements ScoreDirectorFactoryService<Solution_,Score_>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuildScoreDirectorFactory
(ClassLoader classLoader, SolutionDescriptor<Solution_> solutionDescriptor, ScoreDirectorFactoryConfig config, EnvironmentMode environmentMode) Returns aSupplier
which returns new instance of a score director defined byScoreDirectorFactoryService.getSupportedScoreDirectorType()
.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.optaplanner.core.impl.score.director.ScoreDirectorFactoryService
getPriority
-
Constructor Details
-
EasyScoreDirectorFactoryService
public EasyScoreDirectorFactoryService()
-
-
Method Details
-
getSupportedScoreDirectorType
- Specified by:
getSupportedScoreDirectorType
in interfaceScoreDirectorFactoryService<Solution_,
Score_ extends Score<Score_>> - Returns:
- never null, the score director type that is implemented by the factory
-
buildScoreDirectorFactory
public Supplier<AbstractScoreDirectorFactory<Solution_,Score_>> buildScoreDirectorFactory(ClassLoader classLoader, SolutionDescriptor<Solution_> solutionDescriptor, ScoreDirectorFactoryConfig config, EnvironmentMode environmentMode) Description copied from interface:ScoreDirectorFactoryService
Returns aSupplier
which returns new instance of a score director defined byScoreDirectorFactoryService.getSupportedScoreDirectorType()
. This is done so that the actual factory is only instantiated after all the configuration fail-fasts have been performed.- Specified by:
buildScoreDirectorFactory
in interfaceScoreDirectorFactoryService<Solution_,
Score_ extends Score<Score_>> solutionDescriptor
- never null, solution descriptor provided by the solverconfig
- never null, configuration to use for instantiating the factoryenvironmentMode
- never null- Returns:
- null when this type is not configured
-