FloatRange

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 @NonNull double

Smallest value.

abstract @NonNull boolean

Whether the from value is included in the range

abstract @NonNull double
to()

Largest value.

abstract @NonNull boolean

Whether the to value is included in the range

Public methods

from

@NonNull
public abstract double from()

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

fromInclusive

@NonNull
public abstract boolean fromInclusive()

Whether the from value is included in the range

to

@NonNull
public abstract double to()

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

toInclusive

@NonNull
public abstract boolean toInclusive()

Whether the to value is included in the range