IntRange


  • Cmn
    @MustBeDocumented
    @Retention(value = AnnotationRetention.BINARY)
    @Target(allowedTargets = [AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY_GETTER, AnnotationTarget.PROPERTY_SETTER, AnnotationTarget.VALUE_PARAMETER, AnnotationTarget.FIELD, AnnotationTarget.LOCAL_VARIABLE, AnnotationTarget.ANNOTATION_CLASS])
    annotation 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() {
...
}

Summary

Public constructors

IntRange(from: Long, to: Long)
Cmn

Public properties

Long

Smallest value, inclusive

Cmn
Long

Largest value, inclusive

Cmn

Public constructors

IntRange

IntRange(from: Long = Long.MIN_VALUE, to: Long = Long.MAX_VALUE)

Public properties

from

val fromLong

Smallest value, inclusive

to

val toLong

Largest value, inclusive