Class StaticBigDecimalGenerator.Builder
- All Implemented Interfaces:
Builder<BigDecimal>
- Enclosing class:
StaticBigDecimalGenerator
Fluent builder for
StaticBigDecimalGenerator.-
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(), parsed from the given string via theBigDecimal(String)constructor.value(BigDecimal value) 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 toBigDecimal.ZERO.- Parameters:
value- the constant value to generate- Returns:
- this builder, for chaining
-
value
Sets the fixed value returned by every call togenerate(), parsed from the given string via theBigDecimal(String)constructor.- Parameters:
value- the constant value to generate, as aBigDecimalstring representation- 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
-