@API(status=MAINTAINED, since="1.0") public interface FloatArbitrary extends NumericalArbitrary<java.lang.Float,FloatArbitrary>
Arbitrary.ArbitraryFacade
Modifier and Type | Method and Description |
---|---|
FloatArbitrary |
between(float min,
boolean minIncluded,
float max,
boolean maxIncluded)
Set the allowed lower
min (included) and upper max (included) border of generated numbers. |
default FloatArbitrary |
between(float min,
float max)
Set the allowed lower
min (included) and upper max (included) border of generated numbers. |
FloatArbitrary |
greaterOrEqual(float min)
Set the allowed lower
min (included) border of generated numbers. |
FloatArbitrary |
greaterThan(float min)
Set the allowed lower
min (excluded) border of generated numbers. |
FloatArbitrary |
lessOrEqual(float max)
Set the allowed upper
max (included) border of generated numbers. |
FloatArbitrary |
lessThan(float max)
Set the allowed upper
max (excluded) border of generated numbers. |
FloatArbitrary |
ofScale(int scale)
Set the scale (maximum number of decimal places) to
scale . |
FloatArbitrary |
shrinkTowards(float target)
Set shrinking target to
target which must be between the allowed bounds. |
withDistribution
allValues, array, asGeneric, collect, edgeCases, exhaustive, exhaustive, filter, fixGenSize, flatMap, forEachValue, generator, injectDuplicates, injectNull, isUnique, iterator, list, map, optional, sample, sampleStream, set, stream, tuple1, tuple2, tuple3, tuple4, unique
default FloatArbitrary between(float min, float max)
min
(included) and upper max
(included) border of generated numbers.min
- The lower border of possible valuesmax
- The upper border of possible valuesFloatArbitrary between(float min, boolean minIncluded, float max, boolean maxIncluded)
min
(included) and upper max
(included) border of generated numbers.
Specify if borders should be included in allowed values or not.min
- The lower border of possible valuesminIncluded
- Should the lower border be includedmax
- The upper border of possible valuesmaxIncluded
- Should the upper border be includedFloatArbitrary greaterOrEqual(float min)
min
(included) border of generated numbers.min
- The lower border of possible values@API(status=MAINTAINED, since="1.2.7") FloatArbitrary greaterThan(float min)
min
(excluded) border of generated numbers.min
- The lower border of possible valuesFloatArbitrary lessOrEqual(float max)
max
(included) border of generated numbers.max
- The upper border of possible values@API(status=MAINTAINED, since="1.2.7") FloatArbitrary lessThan(float max)
max
(excluded) border of generated numbers.max
- The upper border of possible valuesFloatArbitrary ofScale(int scale)
scale
.@API(status=EXPERIMENTAL, since="1.1.5") FloatArbitrary shrinkTowards(float target)
target
which must be between the allowed bounds.