Releases: mguenther/gen
Releases · mguenther/gen
1.2.0
This is release 1.2.0 of Gen. It adds the select
factory method to the Gen
class, which allows users to randomly select a generator from a set of generators to produce samples from. select
comes in different flavours.
Gen<T> select(Function<Random, List<Gen<T>>> generatorsFn)
Gen<T> select(Function<Random, List<Gen<T>>> generatorsFn, Random sourceOfRandomness)
Gen<T> select(List<Gen<T>> generators)
Gen<T> select(List<Gen<T>> generators, Random sourceOfRandomness)
Option 1 + 2 allows to couple the generators to produce from with the same source of randomness, while option 3 + 4 does not care about that kind of coupling.
You can obtain the binaries from Maven central or include the dependency using the following Maven coordinates in your build.
Maven:
<dependency>
<groupId>net.mguenther.gen</groupId>
<artifactId>gen</artifactId>
<version>1.2.0</version>
</dependency>
Gradle:
compile 'net.mguenther.gen:gen:1.2.0'
Changelog:
See 1.2.0 for a list of all included features and bugfixes.