Class JsonbGenerator.Builder

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

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

    • fields

      public JsonbGenerator.Builder fields(int fields)
      Sets the number of key/value pairs in the generated JSON object. Field values cycle through string, integer, double, and boolean types in order. Defaults to 3.
      Parameters:
      fields - the number of fields to emit
      Returns:
      this builder, for chaining
    • build

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