Annotation Type FloatRange


@Retention(RUNTIME) @Target(TYPE_USE) public @interface FloatRange
Controls the range of a double.

This annotation is made to be used with float or Float and not other numeric types. It is only supported by the float liaison.

  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    float
    The maximum value.
    float
    The minimum value.
  • Element Details

    • min

      float min
      The minimum value.

      If set to Float.NEGATIVE_INFINITY (the default), the bounds check is disabled.

      Returns:
      the min value, inclusive
      Default:
      -1.0f/0.0f
    • max

      float max
      The maximum value.

      If set to Float.POSITIVE_INFINITY (the default), the bounds check is disabled.

      Returns:
      the max value, inclusive
      Default:
      1.0f/0.0f