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
Constructors Constructor Description EasyScoreDirectorFactoryService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Supplier<AbstractScoreDirectorFactory<Solution_,Score_>>
buildScoreDirectorFactory(ClassLoader classLoader, SolutionDescriptor<Solution_> solutionDescriptor, ScoreDirectorFactoryConfig config)
Returns aSupplier
which returns new instance of a score director defined byScoreDirectorFactoryService.getSupportedScoreDirectorType()
.ScoreDirectorType
getSupportedScoreDirectorType()
-
-
-
Method Detail
-
getSupportedScoreDirectorType
public ScoreDirectorType 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)
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 factory- Returns:
- null when this type is not configured
-
-