Class StringArrayGenerator.Builder

java.lang.Object
io.bloviate.gen.AbstractBuilder<String[]>
io.bloviate.gen.StringArrayGenerator.Builder
All Implemented Interfaces:
Builder<String[]>
Enclosing class:
StringArrayGenerator

public static class StringArrayGenerator.Builder extends AbstractBuilder<String[]>
Fluent builder for StringArrayGenerator.
  • 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

    • length

      public StringArrayGenerator.Builder length(int length)
      Sets the number of elements in the generated array. Defaults to 3.
      Parameters:
      length - the array length
      Returns:
      this builder, for chaining
    • elementLength

      public StringArrayGenerator.Builder elementLength(int elementLength)
      Sets the character length of each generated string element. Defaults to 10.
      Parameters:
      elementLength - the number of alphabetic characters per element
      Returns:
      this builder, for chaining
    • build

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