|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | |||||||||
@Documented @Retention(value=RUNTIME) @Target(value=METHOD) @ConstraintDefinition public @interface FloatConstraint
Limits the value of a property to be a member of a specific set. The property value may be a boxed or unboxed float, double, String, CharSequence, char, Character, or character array. If the property value is outside the set, an IllegalArgumentException is thrown.
Example:
public interface PolarCoordinate extends Storable {
double getTheta();
@FloatConstraint(min=0, max=Math.PI * 2, disallowed=Double.NaN)
void setTheta(double radians);
...
}
IntegerConstraint,
TextConstraint| Optional Element Summary | |
|---|---|
double[] |
allowed
Specific allowed values for property. |
double[] |
disallowed
Specific disallowed values for property. |
double |
max
Specify maximum allowed value for float/double property. |
double |
min
Specify minimum allowed value for float/double property. |
public abstract double[] allowed
public abstract double[] disallowed
public abstract double min
public abstract double max
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | |||||||||