Package net.jqwik.api.arbitraries
Interface SizableArbitrary<U extends @Nullable Object>
- All Superinterfaces:
Arbitrary<U>
- All Known Subinterfaces:
ArrayArbitrary<T,
,A> IteratorArbitrary<T>
,ListArbitrary<T>
,MapArbitrary<K,
,V> SetArbitrary<T>
,StreamableArbitrary<T,
,U> StreamArbitrary<T>
@API(status=MAINTAINED,
since="1.0")
public interface SizableArbitrary<U extends @Nullable Object>
extends Arbitrary<U>
Fluent interface to configure arbitraries that have size constraints for generated values, e.g. collections and arrays.
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.jqwik.api.Arbitrary
Arbitrary.ArbitraryFacade
-
Method Summary
Modifier and TypeMethodDescriptionofMaxSize
(int maxSize) Set upper size boundarymaxSize
(included).ofMinSize
(int minSize) Set lower size boundaryminSize
(included).default SizableArbitrary<U>
ofSize
(int size) Fix the size tosize
.withSizeDistribution
(RandomDistribution distribution) Set distributiondistribution
of size of generated arbitraryMethods inherited from interface net.jqwik.api.Arbitrary
allValues, array, asGeneric, collect, dontShrink, edgeCases, edgeCases, edgeCases, exhaustive, exhaustive, filter, filter, fixGenSize, flatMap, forEachValue, generator, generator, generatorWithEmbeddedEdgeCases, ignoreException, ignoreException, ignoreExceptions, ignoreExceptions, injectDuplicates, injectNull, isGeneratorMemoizable, iterator, list, map, optional, optional, sample, sampleStream, set, stream, tuple1, tuple2, tuple3, tuple4, tuple5, withoutEdgeCases
-
Method Details
-
ofSize
Fix the size tosize
. -
ofMinSize
Set lower size boundaryminSize
(included). -
ofMaxSize
Set upper size boundarymaxSize
(included). -
withSizeDistribution
@API(status=EXPERIMENTAL, since="1.5.3") SizableArbitrary<U> withSizeDistribution(RandomDistribution distribution) Set distributiondistribution
of size of generated arbitrary
-