Package net.jqwik.api.state
Interface ActionChainArbitrary<S>
-
- All Superinterfaces:
Arbitrary<ActionChain<S>>
@API(status=EXPERIMENTAL, since="1.7.0") public interface ActionChainArbitrary<S> extends Arbitrary<ActionChain<S>>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.jqwik.api.Arbitrary
Arbitrary.ArbitraryFacade
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description default ActionChainArbitrary<S>
addAction(int weight, Action<S> action)
Deprecated.UsewithAction(int, Action)
instead.default ActionChainArbitrary<S>
addAction(Action<S> action)
Deprecated.UsewithAction(Action)
instead.ActionChainArbitrary<S>
improveShrinkingWith(java.util.function.Supplier<ChangeDetector<S>> detectorSupplier)
Set supplier for the type specific ChangeDetector which can make shrinking of action chains more effective.default ActionChainArbitrary<S>
infinite()
Create a potentially infinite chain.ActionChainArbitrary<S>
withAction(int weight, Action<S> action)
Allow an additional action to be generated.default ActionChainArbitrary<S>
withAction(Action<S> action)
Allow an additional action with default weight of 1.ActionChainArbitrary<S>
withMaxTransformations(int maxSize)
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, ignoreException, ignoreExceptions, ignoreExceptions, injectDuplicates, injectNull, isGeneratorMemoizable, iterator, list, map, optional, optional, sample, sampleStream, set, stream, tuple1, tuple2, tuple3, tuple4, tuple5, withoutEdgeCases
-
-
-
-
Method Detail
-
addAction
@API(status=DEPRECATED) default ActionChainArbitrary<S> addAction(Action<S> action)
Deprecated.UsewithAction(Action)
instead. Will soon be removed.
-
addAction
@API(status=DEPRECATED, since="1.7.2") default ActionChainArbitrary<S> addAction(int weight, Action<S> action)
Deprecated.UsewithAction(int, Action)
instead. Will soon be removed.
-
withAction
@API(status=EXPERIMENTAL, since="1.7.2") default ActionChainArbitrary<S> withAction(Action<S> action)
Allow an additional action with default weight of 1.- Parameters:
action
- Instance of Action.Dependent or Action.Independent- Returns:
- new arbitrary instance
-
withAction
@API(status=EXPERIMENTAL, since="1.7.2") ActionChainArbitrary<S> withAction(int weight, Action<S> action)
Allow an additional action to be generated.- Parameters:
weight
- Determines the relative probability of an action to be chosen.action
- Instance of Action.Dependent or Action.Independent- Returns:
- new arbitrary instance
-
withMaxTransformations
ActionChainArbitrary<S> withMaxTransformations(int maxSize)
Set the intended number of transformations of generated chains.Setting
maxTransformations
to-1
creates a potentially infinite chain. Such a chain will only end when a Transformer.endOfChain() is applied.- Returns:
- new arbitrary instance
-
infinite
default ActionChainArbitrary<S> infinite()
Create a potentially infinite chain. Such a chain will only end when a Transformer.endOfChain() is applied.- Returns:
- new arbitrary instance
-
improveShrinkingWith
ActionChainArbitrary<S> improveShrinkingWith(java.util.function.Supplier<ChangeDetector<S>> detectorSupplier)
Set supplier for the type specific ChangeDetector which can make shrinking of action chains more effective.- Parameters:
detectorSupplier
- A function to create a new ChangeDetector instance.- Returns:
- new arbitrary instance
-
-