Package org.jetbrains.annotations
Annotation Type Range
-
@Documented @Retention(CLASS) @Target(TYPE_USE) public @interface Range
An annotation which allows to specify for integral type (byte, char, short, int, long) an allowed values range. Applying this annotation to other types is not correct.Example:
public @Range(from = 0, to = Integer.MAX_VALUE) int length() { return this.length; // returns a non-negative integer }
- Since:
- 17.0.0