Annotation Type StringRange


  • @Retention(RUNTIME)
    @Target(METHOD)
    public @interface StringRange
    This annotation limits the values that a config node can have. Because of annotation limits, there is an annotation for: decimals, numerics and String length.

    When the String is null, the range validation is skipped. Use Required if null shouldn't be allowed.

    Since:
    4.2.0
    • Required Element Summary

      Required Elements 
      Modifier and Type Required Element Description
      int from
      The minimal String length allowed (inclusive.)
      int to
      The maximal String length allowed (inclusive.)
    • Element Detail

      • from

        int from
        The minimal String length allowed (inclusive.)
        Returns:
        the minimal value allowed (inclusive.)
        Since:
        4.2.0
      • to

        int to
        The maximal String length allowed (inclusive.)
        Returns:
        the maximal value allowed (inclusive.)
        Since:
        4.2.0