Class BotStrategyConfig.Builder
java.lang.Object
org.xxdc.oss.example.bot.BotStrategyConfig.Builder
- Enclosing class:
BotStrategyConfig
A builder for constructing a
BotStrategyConfig instance.
This builder allows setting the maximum number of iterations, maximum depth, and maximum execution time in milliseconds for a bot strategy configuration.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds aBotStrategyConfiginstance with the configured settings.Sets the maximum depth for the bot strategy.maxIterations(Integer maxIterations) Sets the maximum number of iterations for the bot strategy.maxTimeMillis(Long maxTimeMillis) Sets the maximum execution time in milliseconds for the bot strategy.maxTimeMillis(TimeUnit timeUnit, long time) Sets the maximum execution time for the bot strategy.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
maxIterations
Sets the maximum number of iterations for the bot strategy.- Parameters:
maxIterations- the maximum number of iterations- Returns:
- this builder instance
-
maxDepth
Sets the maximum depth for the bot strategy.- Parameters:
maxDepth- the maximum depth- Returns:
- this builder instance
-
maxTimeMillis
Sets the maximum execution time in milliseconds for the bot strategy.- Parameters:
maxTimeMillis- the maximum execution time in milliseconds- Returns:
- this builder instance
-
maxTimeMillis
Sets the maximum execution time for the bot strategy.- Parameters:
timeUnit- the time unit of the provided time valuetime- the maximum execution time- Returns:
- this builder instance
-
build
Builds aBotStrategyConfiginstance with the configured settings.- Returns:
- the constructed
BotStrategyConfiginstance
-