Annotation Interface InRange


Mark a parameter of a Property method with this annotation to constrain the values generated for the parameter to a given range.

Different generators may use different min/max attribute pairs. Generators that produce primitive values or values of their wrapper types will likely want to use the attribute pairs of corresponding type. Otherwise, a generator can use min() and max(), and take on the responsibility of converting their string values to values of the desired type.

  • Element Details

    • minByte

      byte minByte
      Returns:
      a minimum byte value
      Default:
      (byte)0x80
    • maxByte

      byte maxByte
      Returns:
      a maximum byte value
      Default:
      (byte)0x7f
    • minShort

      short minShort
      Returns:
      a minimum short value
      Default:
      -32768
    • maxShort

      short maxShort
      Returns:
      a maximum short value
      Default:
      32767
    • minChar

      char minChar
      Returns:
      a minimum char value
      Default:
      '\u0000'
    • maxChar

      char maxChar
      Returns:
      a maximum char value
      Default:
      '\uffff'
    • minInt

      int minInt
      Returns:
      a minimum int value
      Default:
      -2147483648
    • maxInt

      int maxInt
      Returns:
      a maximum int value
      Default:
      2147483647
    • minLong

      long minLong
      Returns:
      a minimum long value
      Default:
      -9223372036854775808L
    • maxLong

      long maxLong
      Returns:
      a maximum long value
      Default:
      9223372036854775807L
    • minFloat

      float minFloat
      Returns:
      a minimum float value
      Default:
      0.0f
    • maxFloat

      float maxFloat
      Returns:
      a maximum float value
      Default:
      1.0f
    • minDouble

      double minDouble
      Returns:
      a minimum double value
      Default:
      0.0
    • maxDouble

      double maxDouble
      Returns:
      a maximum double value
      Default:
      1.0
    • min

      String min
      Returns:
      a minimum value, represented in string form
      Default:
      ""
    • max

      String max
      Returns:
      a maximum value, represented in string form
      Default:
      ""
    • format

      String format
      Returns:
      a formatting hint, such as a date format string, that generators can use when converting values from strings
      Default:
      ""