from List Weighted
fun <T> ArbExtensionPoint.fromListWeighted(weightWithValueList: List<Pair<Int, T>>): ArbArgsGenerator<T>(source)
Returns an ArbArgsGenerator based on the given weightWithValueList which picks the next value according to the defined weights.
See mergeWeighted for an explanation of the weights. Note, if you want equal probability for each element, then use arb. fromList(...) instead.
Return
The resulting ArbArgsGenerator.
Since
2.2.0
Parameters
weight With Value List
A list of values with associated weights where the values will be converted into a constant ArbArgsGenerator
Throws
in case a weight is wrong (is less than 1)
in case the weights sum up to Int.MAX_VALUE or more.