Class StaticStringGenerator.Builder
- Enclosing class:
StaticStringGenerator
Builder for
StaticStringGenerator instances.-
Field Summary
Fields inherited from class AbstractBuilder
DEFAULT_REFERENCE, random -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds and returns a configured data generator.Sets the constant value returned by every call to the generator.
-
Constructor Details
-
Builder
Constructs a new builder. The random generator is required by the builder contract but is never consulted, since the generated value is constant.- Parameters:
random- the random generator (unused by this generator)
-
-
Method Details
-
value
Sets the constant value returned by every call to the generator.- Parameters:
value- the fixed string to emit. Defaults to the empty string"".- 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
-