Package net.jqwik.api.arbitraries
Interface FloatArbitrary
-
- All Superinterfaces:
Arbitrary<java.lang.Float>
,NumericalArbitrary<java.lang.Float,FloatArbitrary>
@API(status=MAINTAINED, since="1.0") public interface FloatArbitrary extends NumericalArbitrary<java.lang.Float,FloatArbitrary>
Fluent interface to configure the generation of Float and float 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 FloatArbitrary
between(float min, boolean minIncluded, float max, boolean maxIncluded)
Set the allowed lowermin
(included) and uppermax
(included) border of generated numbers.default FloatArbitrary
between(float min, float max)
Set the allowed lowermin
(included) and uppermax
(included) border of generated numbers.FloatArbitrary
greaterOrEqual(float min)
Set the allowed lowermin
(included) border of generated numbers.FloatArbitrary
greaterThan(float min)
Set the allowed lowermin
(excluded) border of generated numbers.FloatArbitrary
lessOrEqual(float max)
Set the allowed uppermax
(included) border of generated numbers.FloatArbitrary
lessThan(float max)
Set the allowed uppermax
(excluded) border of generated numbers.FloatArbitrary
ofScale(int scale)
Set the scale (maximum number of decimal places) toscale
.FloatArbitrary
shrinkTowards(float 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, isUnique, iterator, list, map, optional, sample, sampleStream, set, stream, tuple1, tuple2, tuple3, tuple4, tuple5, unique, withoutEdgeCases
-
Methods inherited from interface net.jqwik.api.arbitraries.NumericalArbitrary
withDistribution
-
-
-
-
Method Detail
-
between
default FloatArbitrary between(float min, float 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
-
between
FloatArbitrary between(float min, boolean minIncluded, float 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
-
greaterOrEqual
FloatArbitrary greaterOrEqual(float min)
Set the allowed lowermin
(included) border of generated numbers.- Parameters:
min
- The lower border of possible values
-
greaterThan
@API(status=MAINTAINED, since="1.2.7") FloatArbitrary greaterThan(float min)
Set the allowed lowermin
(excluded) border of generated numbers.- Parameters:
min
- The lower border of possible values
-
lessOrEqual
FloatArbitrary lessOrEqual(float max)
Set the allowed uppermax
(included) border of generated numbers.- Parameters:
max
- The upper border of possible values
-
lessThan
@API(status=MAINTAINED, since="1.2.7") FloatArbitrary lessThan(float max)
Set the allowed uppermax
(excluded) border of generated numbers.- Parameters:
max
- The upper border of possible values
-
ofScale
FloatArbitrary ofScale(int scale)
Set the scale (maximum number of decimal places) toscale
.
-
shrinkTowards
@API(status=MAINTAINED, since="1.4.0") FloatArbitrary shrinkTowards(float target)
Set shrinking target totarget
which must be between the allowed bounds.
-
-