Annotation Interface Range


@Target(FIELD) @Retention(RUNTIME) public @interface Range
Validates that a numeric config value falls within the specified range. If the value is out of range, it is reset to the field's default value and a warning is logged.

验证数值配置值是否在指定范围内。如果值超出范围,将重置为字段默认值并记录警告。

See Also:
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    double
    Maximum allowed value (inclusive).
    double
    Minimum allowed value (inclusive).
  • Element Details

    • min

      double min
      Minimum allowed value (inclusive). Default: -Double.MAX_VALUE
      Default:
      -1.7976931348623157E308
    • max

      double max
      Maximum allowed value (inclusive). Default: Double.MAX_VALUE
      Default:
      1.7976931348623157E308