Interface FloatArbitrary

All Superinterfaces:
Arbitrary<Float>, NumericalArbitrary<Float,FloatArbitrary>

@API(status=MAINTAINED, since="1.0") public interface FloatArbitrary extends NumericalArbitrary<Float,FloatArbitrary>
Fluent interface to configure the generation of Float and float values.
  • Method Details

    • between

      default FloatArbitrary between(float min, float max)
      Set the allowed lower min (included) and upper max (included) border of generated numbers.
      Parameters:
      min - The lower border of possible values
      max - The upper border of possible values
    • between

      FloatArbitrary between(float min, boolean minIncluded, float max, boolean maxIncluded)
      Set the allowed lower min (included) and upper max (included) border of generated numbers. Specify if borders should be included in allowed values or not.
      Parameters:
      min - The lower border of possible values
      minIncluded - Should the lower border be included
      max - The upper border of possible values
      maxIncluded - Should the upper border be included
    • greaterOrEqual

      FloatArbitrary greaterOrEqual(float min)
      Set the allowed lower min (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 lower min (excluded) border of generated numbers.
      Parameters:
      min - The lower border of possible values
    • lessOrEqual

      FloatArbitrary lessOrEqual(float max)
      Set the allowed upper max (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 upper max (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) to scale.
    • shrinkTowards

      @API(status=MAINTAINED, since="1.4.0") FloatArbitrary shrinkTowards(float target)
      Set shrinking target to target which must be between the allowed bounds.
    • withSpecialValue

      @API(status=EXPERIMENTAL, since="1.5.4") FloatArbitrary withSpecialValue(float special)
      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

      @API(status=EXPERIMENTAL, since="1.5.4") FloatArbitrary withStandardSpecialValues()
      Inject a selection of special values using withSpecialValue(float): 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