Package net.jqwik.api
Interface RandomGenerator<T>
@API(status=STABLE,
since="1.0")
public interface RandomGenerator<T>
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptiondefault RandomGenerator<List<T>>
default RandomGenerator<T>
default RandomGenerator<T>
default <U> RandomGenerator<U>
default <U> RandomGenerator<U>
flatMap
(Function<T, RandomGenerator<U>> mapper) default RandomGenerator<T>
ignoreExceptions
(Class<? extends Throwable>[] exceptionTypes) default RandomGenerator<T>
injectDuplicates
(double duplicateProbability) default <U> RandomGenerator<U>
default <U> RandomGenerator<U>
mapShrinkable
(Function<Shrinkable<T>, Shrinkable<U>> mapper) default Stream<Shrinkable<T>>
default RandomGenerator<T>
withEdgeCases
(int genSize, EdgeCases<T> edgeCases)
-
Method Details
-
next
- Parameters:
random
- the source of randomness. Injected by jqwik itself.- Returns:
- the next generated value wrapped within the Shrinkable interface. The method must ALWAYS return a next value.
-
map
-
mapShrinkable
@API(status=INTERNAL) default <U> RandomGenerator<U> mapShrinkable(Function<Shrinkable<T>, Shrinkable<U>> mapper) -
flatMap
-
flatMap
@API(status=INTERNAL) default <U> RandomGenerator<U> flatMap(Function<T, Arbitrary<U>> mapper, int genSize, boolean withEmbeddedEdgeCases) -
filter
@API(status=INTERNAL) default RandomGenerator<T> filter(Predicate<T> filterPredicate, int maxMisses) -
withEdgeCases
-
stream
-
collect
-
injectDuplicates
-
ignoreExceptions
@API(status=INTERNAL) default RandomGenerator<T> ignoreExceptions(Class<? extends Throwable>[] exceptionTypes) -
dontShrink
-