Class FloatGenerator.Builder

java.lang.Object
io.bloviate.gen.AbstractBuilder<Float>
io.bloviate.gen.FloatGenerator.Builder
All Implemented Interfaces:
Builder<Float>
Enclosing class:
FloatGenerator

public static class FloatGenerator.Builder extends AbstractBuilder<Float>
Fluent builder for FloatGenerator.
  • Constructor Details

    • Builder

      public Builder(RandomGenerator random)
      Creates a builder backed by the given seeded random source.
      Parameters:
      random - the random source used to draw generated values
  • Method Details

    • start

      public FloatGenerator.Builder start(float start)
      Sets the inclusive lower bound of the generated range. Defaults to 0.
      Parameters:
      start - the smallest value that may be generated (inclusive)
      Returns:
      this builder, for chaining
    • end

      public FloatGenerator.Builder end(float end)
      Sets the exclusive upper bound of the generated range. Defaults to Float.MAX_VALUE; generated values are always strictly less than this bound.
      Parameters:
      end - the upper bound that may never be generated (exclusive)
      Returns:
      this builder, for chaining
    • build

      public FloatGenerator build()
      Description copied from interface: Builder
      Builds and returns a configured data generator.
      Returns:
      a new DataGenerator configured with the builder's settings