Skip to content

Releases: mguenther/gen

1.2.0

10 Apr 10:40
Compare
Choose a tag to compare

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.

  1. Gen<T> select(Function<Random, List<Gen<T>>> generatorsFn)
  2. Gen<T> select(Function<Random, List<Gen<T>>> generatorsFn, Random sourceOfRandomness)
  3. Gen<T> select(List<Gen<T>> generators)
  4. 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.