Gen<T> |
Arbitrary.apply(int size) |
Returns a generator for objects of type T.
|
static Gen<java.lang.Character> |
Gen.choose(char... characters) |
Chooses a char from all chars in the array
|
static Gen<java.lang.Character> |
Gen.choose(char min,
char max) |
Chooses a char between min and max, bounds inclusive and chars distributed according to the underlying random
number generator.
|
static Gen<java.lang.Double> |
Gen.choose(double min,
double max) |
Chooses a double between min and max, bounds inclusive and numbers distributed according to the distribution
of the underlying random number generator.
|
static Gen<java.lang.Integer> |
Gen.choose(int min,
int max) |
Chooses an int between min and max, bounds inclusive and numbers distributed according to the distribution of
the underlying random number generator.
|
static Gen<java.lang.Long> |
Gen.choose(long min,
long max) |
Chooses a long between min and max, bounds inclusive and numbers distributed according to the distribution of
the underlying random number generator.
|
static <T extends java.lang.Enum<T>> Gen<T> |
Gen.choose(java.lang.Class<T> clazz) |
Chooses an enum value from all the enum constants defined in the enumerated type.
|
static <T> Gen<T> |
Gen.choose(java.lang.Iterable<T> values) |
Chooses a value from all values in the iterable
|
static <T> Gen<T> |
Gen.choose(T... values) |
Chooses a value from all values in the array.
|
static <T> Gen<T> |
Gen.fail() |
A failing generator which throws a RuntimeException("failed").
|
static <T> Gen<T> |
Gen.fail(java.lang.String message) |
A failing generator which throws a RuntimeException.
|
default Gen<T> |
Gen.filter(java.util.function.Predicate<? super T> predicate) |
Returns a generator based on this generator which produces values that fulfill the given predicate.
|
default <U> Gen<U> |
Gen.flatMap(java.util.function.Function<? super T,? extends Gen<? extends U>> mapper) |
Maps generated Ts to Us.
|
static <T> Gen<T> |
Gen.frequency(Tuple2<java.lang.Integer,Gen<T>>... generators) |
Chooses one of the given generators according to their frequency.
|
static <T> Gen<T> |
Gen.frequency(java.lang.Iterable<Tuple2<java.lang.Integer,Gen<T>>> generators) |
Chooses one of the given generators according to their frequency.
|
static <T> Gen<T> |
GenModule.frequency(int n,
java.util.Iterator<Tuple2<java.lang.Integer,Gen<T>>> iter) |
Chooses a Gen according to the given frequencies.
|
default Gen<T> |
Gen.intersperse(Gen<T> other) |
Intersperse values from this generator instance with those of another.
|
default <U> Gen<U> |
Gen.map(java.util.function.Function<? super T,? extends U> mapper) |
Maps generated Ts to Us.
|
static <T> Gen<T> |
Gen.of(T t) |
A generator which constantly returns t.
|
static <T> Gen<T> |
Gen.of(T seed,
java.util.function.Function<? super T,? extends T> next) |
|
static <T> Gen<T> |
Gen.oneOf(Gen<T>... generators) |
Randomly chooses one of the given generators.
|
static <T> Gen<T> |
Gen.oneOf(java.lang.Iterable<Gen<T>> generators) |
Randomly chooses one of the given generators.
|
default Gen<T> |
Gen.peek(java.util.function.Consumer<? super T> action) |
|