FloatRange


  • 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 FloatRange

Denotes that the annotated element should be a float or double in the given range

Example:

@FloatRange(from=0.0,to=1.0)
public float getAlpha() {
...
}

Summary

Public constructors

FloatRange(
    from: Double,
    to: Double,
    fromInclusive: Boolean,
    toInclusive: Boolean
)
Cmn

Public properties

Double

Smallest value.

Cmn
Boolean

Whether the from value is included in the range

Cmn
Double

Largest value.

Cmn
Boolean

Whether the to value is included in the range

Cmn

Public constructors

FloatRange

FloatRange(
    from: Double = Double.NEGATIVE_INFINITY,
    to: Double = Double.POSITIVE_INFINITY,
    fromInclusive: Boolean = true,
    toInclusive: Boolean = true
)

Public properties

from

val fromDouble

Smallest value. Whether it is inclusive or not is determined by .fromInclusive

fromInclusive

val fromInclusiveBoolean

Whether the from value is included in the range

to

val toDouble

Largest value. Whether it is inclusive or not is determined by .toInclusive

toInclusive

val toInclusiveBoolean

Whether the to value is included in the range