Package net.jqwik.api.state
Interface ChainArbitrary<T>
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.jqwik.api.Arbitrary
Arbitrary.ArbitraryFacade -
Method Summary
Modifier and TypeMethodDescriptionaddTransformation(int weight, Transformation<T> provider) Add an additional Transformation.default ChainArbitrary<T>addTransformation(Transformation<T> provider) Add an additional Transformation with a default weight of 1.improveShrinkingWith(Supplier<ChangeDetector<T>> detectorSupplier) Set supplier for the type specific ChangeDetector which can make shrinking of chains more effective.default ChainArbitrary<T>infinite()Create a potentially infinite chain.withMaxTransformations(int maxTransformations) Set the intended number of transformations of generated chains.Methods 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, injectDuplicates, injectNull, isGeneratorMemoizable, iterator, list, map, optional, optional, sample, sampleStream, set, stream, tuple1, tuple2, tuple3, tuple4, tuple5, withoutEdgeCases
-
Method Details
-
addTransformation
Add an additional Transformation.- Parameters:
weight- Determines the relative probability of a transformer to be chosen.provider- The provider to add.- Returns:
- instance of arbitrary
-
addTransformation
Add an additional Transformation with a default weight of 1.- Parameters:
provider- The provider to add.- Returns:
- instance of arbitrary
-
withMaxTransformations
Set the intended number of transformations of generated chains.Setting
maxTransformationsto-1creates a potentially infinite chain. Such a chain will only end when a Transformer.endOfChain() is applied. -
infinite
Create a potentially infinite chain. Such a chain will only end when a Transformer.endOfChain() is applied. -
improveShrinkingWith
Set supplier for the type specific ChangeDetector which can make shrinking of chains more effective.- Parameters:
detectorSupplier- A function to create a new ChangeDetector instance.
-