Package com.perfectcorp.annotation
Annotation Type FloatRange
-
@Documented @Retention(SOURCE) @Target({METHOD,PARAMETER,FIELD,LOCAL_VARIABLE,ANNOTATION_TYPE}) public @interface FloatRangeDenotes that the annotated element should be a float or double in the given rangeExample:
@FloatRange(from=0.0,to=1.0) public float getAlpha() { ... }
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description doublefromSmallest value.booleanfromInclusiveWhether the from value is included in the rangedoubletoLargest value.booleantoInclusiveWhether the to value is included in the range
-
-
-
Element Detail
-
from
double from
Smallest value. Whether it is inclusive or not is determined byfromInclusive()- Default:
- -1.0/0.0
-
-
-
to
double to
Largest value. Whether it is inclusive or not is determined bytoInclusive()- Default:
- 1.0/0.0
-
-