@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. |
FloatArbitrary |
withSpecialValue(float special)
Inject a special value into generated values and edge cases.
|
FloatArbitrary |
withStandardSpecialValues()
Inject a selection of special values using withSpecialValue(float):
Float.NaN
Float.MIN_VALUE
Float.MIN_NORMAL
Float.POSITIVE_INFINITY
Float.NEGATIVE_INFINITY
This value can be outside the constraints of the arbitrary,
e.g. have more decimals than specified by ofScale(int).
|
withDistribution
allValues, array, asGeneric, collect, dontShrink, edgeCases, edgeCases, edgeCases, exhaustive, exhaustive, filter, filter, fixGenSize, flatMap, forEachValue, generator, generator, generatorWithEmbeddedEdgeCases, ignoreException, ignoreException, ignoreExceptions, ignoreExceptions, injectDuplicates, injectNull, isGeneratorMemoizable, iterator, list, map, optional, optional, sample, sampleStream, set, stream, tuple1, tuple2, tuple3, tuple4, tuple5, withoutEdgeCases
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=MAINTAINED, since="1.4.0") FloatArbitrary shrinkTowards(float target)
target
which must be between the allowed bounds.@API(status=EXPERIMENTAL, since="1.5.4") FloatArbitrary withSpecialValue(float special)
special
- value@API(status=EXPERIMENTAL, since="1.5.4") FloatArbitrary withStandardSpecialValues()