@Retention(value=CLASS)
@Target(value={METHOD,PARAMETER,FIELD,LOCAL_VARIABLE,ANNOTATION_TYPE})
public @interface FloatRange
Example:
@FloatRange(from=0.0,to=1.0)
public float getAlpha() {
...
}
Modifier and Type | Optional Element and Description |
---|---|
double |
from
Smallest value.
|
boolean |
fromInclusive
Whether the from value is included in the range
|
double |
to
Largest value.
|
boolean |
toInclusive
Whether the to value is included in the range
|
public abstract double from
fromInclusive()
public abstract double to
toInclusive()