Top Description Methods
org.checkerframework.common.value.qual

public @Interface IntRange

extends Annotation
Annotations
@Documented
@Retention:RUNTIME
@Target:TYPE_PARAMETER, TYPE_USE
@SubtypeOf:UnknownVal
Imports
java.lang.annotation.Documented, .ElementType, .Retention, .RetentionPolicy, .Target, org.checkerframework.framework.qual.SubtypeOf

An expression with this type evaluates to an integral value (byte, short, char, int, or long) in the given range. The bounds are inclusive. For example, the following declaration allows the 12 values 0, 1, ..., 11:
@IntRange(from=0, to=11) int month;

If only one of the to and from fields is set, then the other will default to the max/min value of the type of the variable that is annotated. (In other words, the defaults Long.MIN_VALUE and Long.MAX_VALUE are used only for long; appropriate values are used for other types.)

Method Summary

Modifier and TypeMethod and Description
public long

Returns:

the largest value in the range, inclusive
from
()

Largest value in the range, inclusive.

public long

Returns:

the largest value in the range, inclusive
to
()

Largest value in the range, inclusive.

Inherited from java.lang.annotation.Annotation:
annotationTypeequalshashCodetoString

Method Detail

fromback to summary
public long from()

Largest value in the range, inclusive.

Returns:long

the largest value in the range, inclusive

toback to summary
public long to()

Largest value in the range, inclusive.

Returns:long

the largest value in the range, inclusive