Class StaticBigDecimalGenerator.Builder

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

public static class StaticBigDecimalGenerator.Builder extends AbstractBuilder<BigDecimal>
Fluent builder for StaticBigDecimalGenerator.
  • Constructor Details

    • Builder

      public Builder(RandomGenerator random)
      Creates a builder backed by the given random source. The source is never used, since this generator always returns the configured value.
      Parameters:
      random - the (unused) random source
  • Method Details

    • value

      Sets the fixed value returned by every call to generate(). Defaults to BigDecimal.ZERO.
      Parameters:
      value - the constant value to generate
      Returns:
      this builder, for chaining
    • value

      Sets the fixed value returned by every call to generate(), parsed from the given string via the BigDecimal(String) constructor.
      Parameters:
      value - the constant value to generate, as a BigDecimal string representation
      Returns:
      this builder, for chaining
    • build

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