Class StaticFloatGenerator.Builder
- Enclosing class:
StaticFloatGenerator
Fluent builder for
StaticFloatGenerator.-
Field Summary
Fields inherited from class AbstractBuilder
DEFAULT_REFERENCE, random -
Constructor Summary
ConstructorsConstructorDescriptionBuilder(RandomGenerator random) Creates a builder backed by the given random source. -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds and returns a configured data generator.Sets the fixed value returned by every call togenerate().
-
Constructor Details
-
Builder
Creates a builder backed by the given random source. The source is never used, since this generator always returns the configured value.- Parameters:
random- the (unused) random source
-
-
Method Details
-
value
Sets the fixed value returned by every call togenerate(). Defaults to0.- Parameters:
value- the constant value to generate- 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
-