Class ByteGenerator.Builder
- Enclosing class:
ByteGenerator
Fluent builder for
ByteGenerator.-
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
-
size
Sets the requested number of bytes to generate. Defaults to25. The effective length is capped at25bytes at generation time, so larger values produce a 25-byte array.- Parameters:
size- the requested array length in bytes- 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
-