Package io.vavr.test
Interface GenModule
-
interface GenModule
-
-
Method Detail
-
frequency
static <T> Gen<T> frequency(int n, java.util.Iterator<Tuple2<java.lang.Integer,Gen<T>>> iter)
Chooses a Gen according to the given frequencies.- Type Parameters:
T
- type of generated values- Parameters:
n
- a random value between 0 and sum(frequencies) - 1iter
- a non-empty Iterator of (frequency, Gen) pairs- Returns:
- A value generator, choosen according to the given frequencies and the underlying n
-
-