Package icyllis.modernui.annotation
Annotation Interface FloatRange
@Documented
@Retention(CLASS)
@Target({METHOD,PARAMETER,FIELD,LOCAL_VARIABLE,ANNOTATION_TYPE})
public @interface 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() {
...
}
-
Optional Element Summary
Modifier and TypeOptional ElementDescriptiondouble
Smallest value.boolean
Whether the from value is included in the rangedouble
Largest value.boolean
Whether the to value is included in the range
-
Element Details
-
from
double fromSmallest value. Whether it is inclusive or not is determined byfromInclusive()
- Default:
-1.0/0.0
-
to
double toLargest value. Whether it is inclusive or not is determined bytoInclusive()
- Default:
1.0/0.0
-
fromInclusive
boolean fromInclusiveWhether the from value is included in the range- Default:
true
-
toInclusive
boolean toInclusiveWhether the to value is included in the range- Default:
true
-