Package net.jqwik.api.arbitraries
Interface BigDecimalArbitrary
-
- All Superinterfaces:
Arbitrary<java.math.BigDecimal>
,NumericalArbitrary<java.math.BigDecimal,BigDecimalArbitrary>
@API(status=MAINTAINED, since="1.0") public interface BigDecimalArbitrary extends NumericalArbitrary<java.math.BigDecimal,BigDecimalArbitrary>
Fluent interface to configure the generation of BigDecimal values.
-
-
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 Modifier and Type Method Description BigDecimalArbitrary
between(java.math.BigDecimal min, boolean minIncluded, java.math.BigDecimal max, boolean maxIncluded)
Set the allowed lowermin
(included) and uppermax
(included) border of generated numbers.default BigDecimalArbitrary
between(java.math.BigDecimal min, java.math.BigDecimal max)
Set the allowed lowermin
(included) and uppermax
(included) border of generated numbers.BigDecimalArbitrary
greaterOrEqual(java.math.BigDecimal min)
Set the allowed lowermin
(included) border of generated numbers.BigDecimalArbitrary
greaterThan(java.math.BigDecimal min)
Set the allowed lowermin
(excluded) border of generated numbers.BigDecimalArbitrary
lessOrEqual(java.math.BigDecimal max)
Set the allowed uppermax
(included) bounder of generated numbers.BigDecimalArbitrary
lessThan(java.math.BigDecimal max)
Set the allowed uppermax
(excluded) border of generated numbers.BigDecimalArbitrary
ofScale(int scale)
Set the scale (maximum number of decimal places) toscale
.BigDecimalArbitrary
shrinkTowards(java.math.BigDecimal target)
Set shrinking target totarget
which must be between the allowed bounds.-
Methods inherited from interface net.jqwik.api.Arbitrary
allValues, array, asGeneric, collect, dontShrink, edgeCases, edgeCases, edgeCases, exhaustive, exhaustive, filter, fixGenSize, flatMap, forEachValue, generator, generator, generatorWithEmbeddedEdgeCases, ignoreException, injectDuplicates, injectNull, iterator, list, map, optional, sample, sampleStream, set, stream, tuple1, tuple2, tuple3, tuple4, tuple5, withoutEdgeCases
-
Methods inherited from interface net.jqwik.api.arbitraries.NumericalArbitrary
withDistribution
-
-
-
-
Method Detail
-
between
default BigDecimalArbitrary between(java.math.BigDecimal min, java.math.BigDecimal max)
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
@API(status=MAINTAINED, since="1.2.7") BigDecimalArbitrary between(java.math.BigDecimal min, boolean minIncluded, java.math.BigDecimal max, boolean maxIncluded)
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
BigDecimalArbitrary greaterOrEqual(java.math.BigDecimal min)
Set the allowed lowermin
(included) border of generated numbers.- Parameters:
min
- The lower border of possible values- Returns:
- new instance of arbitrary
-
greaterThan
@API(status=MAINTAINED, since="1.2.7") BigDecimalArbitrary greaterThan(java.math.BigDecimal min)
Set the allowed lowermin
(excluded) border of generated numbers.- Parameters:
min
- The lower border of possible values- Returns:
- new instance of arbitrary
-
lessOrEqual
BigDecimalArbitrary lessOrEqual(java.math.BigDecimal max)
Set the allowed uppermax
(included) bounder of generated numbers.- Parameters:
max
- The upper border of possible values- Returns:
- new instance of arbitrary
-
lessThan
@API(status=MAINTAINED, since="1.2.7") BigDecimalArbitrary lessThan(java.math.BigDecimal max)
Set the allowed uppermax
(excluded) border of generated numbers.- Parameters:
max
- The upper border of possible values- Returns:
- new instance of arbitrary
-
ofScale
BigDecimalArbitrary ofScale(int scale)
Set the scale (maximum number of decimal places) toscale
.- Parameters:
scale
- number of decimal places- Returns:
- new instance of arbitrary
-
shrinkTowards
@API(status=MAINTAINED, since="1.4.0") BigDecimalArbitrary shrinkTowards(java.math.BigDecimal target)
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
-
-