Package net.jqwik.api.arbitraries
Interface DoubleArbitrary
- All Superinterfaces:
Arbitrary<Double>
,NumericalArbitrary<Double,
DoubleArbitrary>
@API(status=MAINTAINED,
since="1.0")
public interface DoubleArbitrary
extends NumericalArbitrary<Double,DoubleArbitrary>
Fluent interface to configure the generation of Double and double values.
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.jqwik.api.Arbitrary
Arbitrary.ArbitraryFacade
-
Method Summary
Modifier and TypeMethodDescriptionbetween
(double min, boolean minIncluded, double max, boolean maxIncluded) Set the allowed lowermin
(included) and uppermax
(included) border of generated numbers.default DoubleArbitrary
between
(double min, double max) Set the allowed lowermin
(included) and uppermax
(included) border of generated numbers.greaterOrEqual
(double min) Set the allowed lowermin
(included) border of generated numbers.greaterThan
(double min) Set the allowed lowermin
(excluded) border of generated numbers.lessOrEqual
(double max) Set the allowed uppermax
(included) border of generated numbers.lessThan
(double max) Set the allowed uppermax
(excluded) border of generated numbers.ofScale
(int scale) Set the scale (maximum number of decimal places) toscale
.shrinkTowards
(double target) Set shrinking target totarget
which must be between the allowed bounds.withSpecialValue
(double special) Inject a special value into generated values and edge cases.Inject a selection of special values using withSpecialValue(double): Double.NaN Double.MIN_VALUE Double.MIN_NORMAL Double.POSITIVE_INFINITY Double.NEGATIVE_INFINITY This value can be outside the constraints of the arbitrary, e.g. have more decimals than specified by ofScale(int).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, ignoreExceptions, injectDuplicates, injectNull, isGeneratorMemoizable, iterator, list, map, optional, optional, sample, sampleStream, set, stream, tuple1, tuple2, tuple3, tuple4, tuple5, withoutEdgeCases
Methods inherited from interface net.jqwik.api.arbitraries.NumericalArbitrary
withDistribution
-
Method Details
-
between
Set the allowed lowermin
(included) and uppermax
(included) border of generated numbers.- Parameters:
min
- The lower border of possible valuesmax
- The upper border of possible values- Returns:
- new instance of arbitrary
-
between
Set the allowed lowermin
(included) and uppermax
(included) border of generated numbers. Specify if borders should be included in allowed values or not.- Parameters:
min
- The lower border of possible valuesminIncluded
- Should the lower border be includedmax
- The upper border of possible valuesmaxIncluded
- Should the upper border be included- Returns:
- new instance of arbitrary
-
greaterOrEqual
Set the allowed lowermin
(included) border of generated numbers.- Parameters:
min
- The lower border of possible values- Returns:
- new instance of arbitrary
-
greaterThan
Set the allowed lowermin
(excluded) border of generated numbers.- Parameters:
min
- The lower border of possible values- Returns:
- new instance of arbitrary
-
lessOrEqual
Set the allowed uppermax
(included) border of generated numbers.- Parameters:
max
- The upper border of possible values- Returns:
- new instance of arbitrary
-
lessThan
Set the allowed uppermax
(excluded) border of generated numbers.- Parameters:
max
- The upper border of possible values- Returns:
- new instance of arbitrary
-
ofScale
Set the scale (maximum number of decimal places) toscale
.- Parameters:
scale
- number of decimal places- Returns:
- new instance of arbitrary
-
shrinkTowards
Set shrinking target totarget
which must be between the allowed bounds.- Parameters:
target
- The value which is considered to be the most simple value for shrinking- Returns:
- new instance of arbitrary
-
withSpecialValue
Inject a special value into generated values and edge cases. This value can be outside the constraints of the arbitrary, e.g. have more decimals than specified by ofScale(int).- Parameters:
special
- value- Returns:
- new instance of arbitrary
-
withStandardSpecialValues
Inject a selection of special values using withSpecialValue(double): This value can be outside the constraints of the arbitrary, e.g. have more decimals than specified by ofScale(int).- Returns:
- new instance of arbitrary
-