Schnittstelle DoubleArbitrary

Alle Superschnittstellen:
Arbitrary<Double>, NumericalArbitrary<Double,DoubleArbitrary>

@API(status=MAINTAINED, since="1.0") public interface DoubleArbitrary extends NumericalArbitrary<Double,DoubleArbitrary>
Fluent interface to configure the generation of Double and double values.
  • Methodendetails

    • between

      default DoubleArbitrary between(double min, double max)
      Set the allowed lower min (included) and upper max (included) border of generated numbers.
      Parameter:
      min - The lower border of possible values
      max - The upper border of possible values
      Gibt zurück:
      new instance of arbitrary
    • between

      DoubleArbitrary between(double min, boolean minIncluded, double 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.
      Parameter:
      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
      Gibt zurück:
      new instance of arbitrary
    • greaterOrEqual

      DoubleArbitrary greaterOrEqual(double min)
      Set the allowed lower min (included) border of generated numbers.
      Parameter:
      min - The lower border of possible values
      Gibt zurück:
      new instance of arbitrary
    • greaterThan

      @API(status=MAINTAINED, since="1.2.7") DoubleArbitrary greaterThan(double min)
      Set the allowed lower min (excluded) border of generated numbers.
      Parameter:
      min - The lower border of possible values
      Gibt zurück:
      new instance of arbitrary
    • lessOrEqual

      DoubleArbitrary lessOrEqual(double max)
      Set the allowed upper max (included) border of generated numbers.
      Parameter:
      max - The upper border of possible values
      Gibt zurück:
      new instance of arbitrary
    • lessThan

      @API(status=MAINTAINED, since="1.2.7") DoubleArbitrary lessThan(double max)
      Set the allowed upper max (excluded) border of generated numbers.
      Parameter:
      max - The upper border of possible values
      Gibt zurück:
      new instance of arbitrary
    • ofScale

      DoubleArbitrary ofScale(int scale)
      Set the scale (maximum number of decimal places) to scale.
      Parameter:
      scale - number of decimal places
      Gibt zurück:
      new instance of arbitrary
    • shrinkTowards

      @API(status=MAINTAINED, since="1.4.0") DoubleArbitrary shrinkTowards(double target)
      Set shrinking target to target which must be between the allowed bounds.
      Parameter:
      target - The value which is considered to be the most simple value for shrinking
      Gibt zurück:
      new instance of arbitrary
    • withSpecialValue

      @API(status=EXPERIMENTAL, since="1.5.4") DoubleArbitrary withSpecialValue(double 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).
      Parameter:
      special - value
      Gibt zurück:
      new instance of arbitrary
    • withStandardSpecialValues

      @API(status=EXPERIMENTAL, since="1.5.4") DoubleArbitrary withStandardSpecialValues()
      Inject a selection of special values using withSpecialValue(double): This value can be outside the constraints of the arbitrary, e.g. have more decimals than specified by ofScale(int).
      Gibt zurück:
      new instance of arbitrary