Class BotStrategyConfig.Builder

java.lang.Object
org.xxdc.oss.example.bot.BotStrategyConfig.Builder
Enclosing class:
BotStrategyConfig

public static class BotStrategyConfig.Builder extends Object
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 Details

    • Builder

      public Builder()
  • Method Details

    • maxIterations

      public BotStrategyConfig.Builder maxIterations(Integer maxIterations)
      Sets the maximum number of iterations for the bot strategy.
      Parameters:
      maxIterations - the maximum number of iterations
      Returns:
      this builder instance
    • maxDepth

      public BotStrategyConfig.Builder maxDepth(Integer maxDepth)
      Sets the maximum depth for the bot strategy.
      Parameters:
      maxDepth - the maximum depth
      Returns:
      this builder instance
    • maxTimeMillis

      public BotStrategyConfig.Builder maxTimeMillis(Long 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

      public BotStrategyConfig.Builder maxTimeMillis(TimeUnit timeUnit, long time)
      Sets the maximum execution time for the bot strategy.
      Parameters:
      timeUnit - the time unit of the provided time value
      time - the maximum execution time
      Returns:
      this builder instance
    • build

      public BotStrategyConfig build()
      Builds a BotStrategyConfig instance with the configured settings.
      Returns:
      the constructed BotStrategyConfig instance