Package net.jqwik.api.arbitraries
Klasse ArbitraryDecorator<T>
java.lang.Object
net.jqwik.api.arbitraries.ArbitraryDecorator<T>
- Typparameter:
T
- The type of object to be generated by this arbitrary
@API(status=MAINTAINED,
since="1.4.0")
public abstract class ArbitraryDecorator<T>
extends Object
implements Cloneable, Arbitrary<T>
Use this superclass if you want to provide a specialized type of arbitrary,
e.g. with additional methods for configuration or defaults,
but don't want to implement the whole Arbitrary interface yourself.
- Siehe auch:
-
Verschachtelte Klassen - Übersicht
Von Schnittstelle geerbte verschachtelte Klassen/Schnittstellen net.jqwik.api.Arbitrary
Arbitrary.ArbitraryFacade
-
Konstruktorübersicht
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungImplement by calling jqwik's standard DSL for building arbitraries.edgeCases
(int maxEdgeCases) exhaustive
(long maxNumberOfSamples) Create the exhaustive generator for an arbitrary.generator
(int genSize) Create the random generator for an arbitrary.generatorWithEmbeddedEdgeCases
(int genSize) Create the random generator for an arbitrary where the embedded generators, if there are any, also generate edge cases.boolean
toString()
protected <A extends Arbitrary<?>>
AUse to clone current instance with its interface typeVon Klasse geerbte Methoden java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Von Schnittstelle geerbte Methoden net.jqwik.api.Arbitrary
allValues, array, asGeneric, collect, dontShrink, edgeCases, edgeCases, exhaustive, filter, filter, fixGenSize, flatMap, forEachValue, generator, ignoreException, ignoreException, ignoreExceptions, ignoreExceptions, injectDuplicates, injectNull, iterator, list, map, optional, optional, sample, sampleStream, set, stream, tuple1, tuple2, tuple3, tuple4, tuple5, withoutEdgeCases
-
Konstruktordetails
-
ArbitraryDecorator
public ArbitraryDecorator()
-
-
Methodendetails
-
arbitrary
Implement by calling jqwik's standard DSL for building arbitraries.- Gibt zurück:
- a new arbitrary instance
-
generator
Beschreibung aus Schnittstelle kopiert:Arbitrary
Create the random generator for an arbitrary.Starting with version 1.4.0 the returned generator should no longer include edge cases explicitly since those will be injected in Arbitrary.generator(int, boolean)
- Angegeben von:
generator
in SchnittstelleArbitrary<T>
- Parameter:
genSize
- a very unspecific configuration parameter that can be used to influence the configuration and behaviour of a random generator if and only if the generator wants to be influenced. Many generators are independent of genSize.The default value of
genSize
is the number of tries configured for a property. Use Arbitrary.fixGenSize(int) to fix the parameter for a given arbitrary.- Gibt zurück:
- a new random generator instance
-
generatorWithEmbeddedEdgeCases
Beschreibung aus Schnittstelle kopiert:Arbitrary
Create the random generator for an arbitrary where the embedded generators, if there are any, also generate edge cases.Override only if there are any embedded arbitraries / generators, e.g. a container using an element generator
- Angegeben von:
generatorWithEmbeddedEdgeCases
in SchnittstelleArbitrary<T>
- Parameter:
genSize
- See Arbitrary.generator(int) about meaning of this parameter- Gibt zurück:
- a new random generator instance
-
exhaustive
Beschreibung aus Schnittstelle kopiert:Arbitrary
Create the exhaustive generator for an arbitrary. Depending onmaxNumberOfSamples
this can take a long time. This method must be overridden in all arbitraries that support exhaustive generation.- Angegeben von:
exhaustive
in SchnittstelleArbitrary<T>
- Parameter:
maxNumberOfSamples
- The maximum number of samples considered. If during generation it becomes clear that this number will be exceeded generation stops.- Gibt zurück:
- a new exhaustive generator or Optional.empty() if it cannot be created.
-
isGeneratorMemoizable
public boolean isGeneratorMemoizable()- Angegeben von:
isGeneratorMemoizable
in SchnittstelleArbitrary<T>
-
edgeCases
-
toString
-
typedClone
Use to clone current instance with its interface type- Typparameter:
A
- The special interface type of this arbitrary- Gibt zurück:
- A cloned instance of this arbitrary
-