MapValueSpec

Partially configured map rule that defines value generation.

Functions

Link copied to clipboard

Completes this map rule by generating keys with generator.

Link copied to clipboard
abstract infix fun orDefaultAt(probability: Probability): GenerationSpec<MapType>
open infix fun orDefaultAt(probability: Double): GenerationSpec<MapType>

Records the probability of using the property's default value.

Link copied to clipboard
abstract infix fun orNullAt(probability: Probability): GenerationSpec<MapType?>
open infix fun orNullAt(probability: Double): GenerationSpec<MapType?>

Allows this rule to generate null with probability.

Link copied to clipboard
abstract infix fun withSeed(seed: Long): GenerationSpec<MapType>

Sets a deterministic seed for this generation rule.

Link copied to clipboard
abstract infix fun withSize(size: Int): MapGenerationSpec<Key, Value, MapType>

Sets the generated map size.

abstract infix fun withSize(range: IntRange): MapGenerationSpec<Key, Value, MapType>

Sets the generated map size range.