FloatRange

@Documented  @Retention(value = CLASS)  @Target(value = ) 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 methods

abstract double

Smallest value.

abstract boolean

Whether the from value is included in the range

abstract double
to()

Largest value.

abstract boolean

Whether the to value is included in the range

Public methods

from

public abstract double from()

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

fromInclusive

public abstract boolean fromInclusive()

Whether the from value is included in the range

to

public abstract double to()

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

toInclusive

public abstract boolean toInclusive()

Whether the to value is included in the range