Class CompositeKeyComponentGenerator.Builder
- Enclosing class:
CompositeKeyComponentGenerator
Builder for
CompositeKeyComponentGenerator.-
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.cycle(int cycle) This dimension's cardinality — how many distinct values it takes before wrapping back tostart; thecycleterm instart + ((rowIndex / repeat) % cycle).repeat(long repeat) How many consecutive rows share this dimension's value before it advances — therepeatterm instart + ((rowIndex / repeat) % cycle).start(int start) The first (lowest) value this dimension takes, inclusive — thestartterm instart + ((rowIndex / repeat) % cycle).
-
Constructor Details
-
Builder
Creates a builder.- Parameters:
random- the random source (unused by this generator, but required by the contract)
-
-
Method Details
-
start
The first (lowest) value this dimension takes, inclusive — thestartterm instart + ((rowIndex / repeat) % cycle). It is the value emitted for row 0, and the dimension then ranges over[start, start + cycle). Defaults to1.- Parameters:
start- the first value of this dimension, inclusive- Returns:
- this builder, for chaining
-
repeat
How many consecutive rows share this dimension's value before it advances — therepeatterm instart + ((rowIndex / repeat) % cycle). It must equal the product of the sizes (cycles) of all dimensions nested inside this one (use1for the innermost dimension). Defaults to1.- Parameters:
repeat- the number of consecutive rows per value (product of inner dimension sizes)- Returns:
- this builder, for chaining
-
cycle
This dimension's cardinality — how many distinct values it takes before wrapping back tostart; thecycleterm instart + ((rowIndex / repeat) % cycle). Defaults to1.- Parameters:
cycle- the number of distinct values (size) of this dimension- 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
-