Class JsonbGenerator.Builder
- Enclosing class:
JsonbGenerator
Fluent builder for
JsonbGenerator.-
Field Summary
Fields inherited from class AbstractBuilder
DEFAULT_REFERENCE, random -
Constructor Summary
ConstructorsConstructorDescriptionBuilder(RandomGenerator random) Creates a builder backed by the given seeded random source. -
Method Summary
-
Constructor Details
-
Builder
Creates a builder backed by the given seeded random source.- Parameters:
random- the random source used to draw generated values
-
-
Method Details
-
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 to3.- Parameters:
fields- the number of fields to emit- Returns:
- this builder, for chaining
-
build
Description copied from interface:BuilderBuilds and returns a configured data generator.- Returns:
- a new
DataGeneratorconfigured with the builder's settings
-