- Companion:
- object
Value members
Concrete methods
Will keep generating options until one is defined, in which case it is returned.
Will keep generating options until one is defined, in which case it is returned.
If a non-empty option still isn't generated after 1000 attempts, an exception will be thrown.
It is recommended that you use this very sparingly. In nearly all cases, the better alternative is to write your generators such that a return value is guaranteed, rather than generating then discarding.
Produce an infinite stream of generated data.
Produce an infinite stream of generated data.
Use .take(n)
for a finite number of samples.
Produce an infinite stream of generated data.
Produce an infinite stream of generated data.
Use .take(n)
for a finite number of samples.
This will ensure that only unique random data is used and that the resulting set has the desired size.
This will ensure that only unique random data is used and that the resulting set has the desired size.
This is dangerous in that it will block until it generates enough unique elements.
For example, Gen.bool.sizedSet(3)
will never return.
This will ensure that only unique random data is used and that the resulting set has the desired size.
This will ensure that only unique random data is used and that the resulting set has the desired size.
This is dangerous in that it will block until it generates enough unique elements.
For example, Gen.bool.sizedSet1(3)
will never return.
Discard existing state and replace with the result of this generator.
Discard existing state and replace with the result of this generator.
Generates a non-empty subset, unless the underlying seq is empty (in which case this returns an empty seq too).
Generates a non-empty subset, unless the underlying seq is empty (in which case this returns an empty seq too).