Annotation Interface IntRange


Denotes that the annotated element should be an int or long in the given range.

Example:


  @IntRange(from=0,to=255)
  public int getAlpha() {
      ...
  }
 
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    long
    Smallest value in the range, inclusive.
    long
    Largest value in the range, inclusive.
  • Element Details

    • from

      long from
      Smallest value in the range, inclusive.
      Default:
      -9223372036854775808L
    • to

      long to
      Largest value in the range, inclusive.
      Default:
      9223372036854775807L