Package net.jqwik.api
Interface RandomGenerator<T extends @Nullable Object>
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptiondefault RandomGenerator<List<T>>
default RandomGenerator<T>
default RandomGenerator<T>
default <U extends @Nullable Object>
RandomGenerator<U>flatMap
(Function<? super T, ? extends Arbitrary<U>> mapper, int genSize, boolean withEmbeddedEdgeCases) default <U extends @Nullable Object>
RandomGenerator<U>flatMap
(Function<? super T, ? extends RandomGenerator<U>> mapper) default RandomGenerator<T>
ignoreExceptions
(int maxThrows, Class<? extends Throwable>[] exceptionTypes) default RandomGenerator<T>
injectDuplicates
(double duplicateProbability) default <U extends @Nullable Object>
RandomGenerator<U>default <U extends @Nullable Object>
RandomGenerator<U>mapShrinkable
(Function<? super Shrinkable<T>, ? extends 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
@API(status=INTERNAL) default <U extends @Nullable Object> RandomGenerator<U> map(Function<? super T, ? extends U> mapper) -
mapShrinkable
@API(status=INTERNAL) default <U extends @Nullable Object> RandomGenerator<U> mapShrinkable(Function<? super Shrinkable<T>, ? extends Shrinkable<U>> mapper) -
flatMap
@API(status=INTERNAL) default <U extends @Nullable Object> RandomGenerator<U> flatMap(Function<? super T, ? extends RandomGenerator<U>> mapper) -
flatMap
@API(status=INTERNAL) default <U extends @Nullable Object> RandomGenerator<U> flatMap(Function<? super T, ? extends Arbitrary<U>> mapper, int genSize, boolean withEmbeddedEdgeCases) -
filter
@API(status=INTERNAL) default RandomGenerator<T> filter(Predicate<? super T> filterPredicate, int maxMisses) -
withEdgeCases
-
stream
-
collect
-
injectDuplicates
-
ignoreExceptions
@API(status=INTERNAL) default RandomGenerator<T> ignoreExceptions(int maxThrows, Class<? extends Throwable>[] exceptionTypes) -
dontShrink
-