Annotation Interface Size


@Target(FIELD) @Retention(RUNTIME) public @interface Size
The annotated element size must be between the specified boundaries (included).

Value checks on validation step.

Supported types are:

  • CharSequence (length of character sequence is evaluated)

null elements are considered valid.

  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    int
     
    int
     
  • Element Details

    • min

      int min
      Returns:
      size the element must be higher or equal to
      Default:
      0
    • max

      int max
      Returns:
      size the element must be lower or equal to
      Default:
      2147483647