Annotation Interface Max


@Target(PARAMETER) @Retention(RUNTIME) public @interface Max
The annotated element must be a number whose value must be less or equal to the specified maximum.
See Also:
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    long
    Returns the value the element must be less or equal to.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Returns the error message that will be displayed if the constraint fails.
  • Element Details

    • value

      long value
      Returns the value the element must be less or equal to.
      Returns:
      Returns the value the element must be less or equal to
    • message

      String message
      Returns the error message that will be displayed if the constraint fails.
      Returns:
      the error message
      Default:
      "Parameter exceeds maximum value"