FloatRange
@Target([AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY_GETTER, AnnotationTarget.PROPERTY_SETTER, AnnotationTarget.VALUE_PARAMETER, AnnotationTarget.FIELD, AnnotationTarget.LOCAL_VARIABLE, AnnotationTarget.ANNOTATION_CLASS]) class FloatRange
androidx.annotation.FloatRange |
Denotes that the annotated element should be a float or double in the given range
Example:
<code> @FloatRange(from=0.0,to=1.0) public float getAlpha() { ... } </code>
Summary
Public constructors | |
---|---|
Denotes that the annotated element should be a float or double in the given range |
Properties | |
---|---|
Double |
Smallest value. |
Boolean |
Whether the from value is included in the range |
Double |
Largest value. |
Boolean |
Whether the to value is included in the range |
Public constructors
<init>
FloatRange(
from: Double,
to: Double,
fromInclusive: Boolean,
toInclusive: Boolean)
Denotes that the annotated element should be a float or double in the given range
Example:
<code> @FloatRange(from=0.0,to=1.0) public float getAlpha() { ... } </code>