Class FloatGenerator.Builder
- Enclosing class:
FloatGenerator
Fluent builder for
FloatGenerator.-
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
-
start
Sets the inclusive lower bound of the generated range. Defaults to0.- Parameters:
start- the smallest value that may be generated (inclusive)- Returns:
- this builder, for chaining
-
end
Sets the exclusive upper bound of the generated range. Defaults toFloat.MAX_VALUE; generated values are always strictly less than this bound.- Parameters:
end- the upper bound that may never be generated (exclusive)- 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
-