TypeValidator
public class FloatValidator extends PatternValidator implements TypeValidator
float
and java.lang.Float
types.resourceBundle
Constructor | Description |
---|---|
FloatValidator() |
Creates a new FloatValidator with no restrictions.
|
Modifier and Type | Method | Description |
---|---|---|
void |
clearFixed() |
Clears the fixed value for this FloatValidator.
|
void |
clearMax() |
Clears the maximum value for this FloatValidator.
|
void |
clearMin() |
Clears the minimum value for this FloatValidator.
|
java.lang.Float |
getFixed() |
Returns the configured fixed value for float validation.
|
java.lang.Float |
getMaxExclusive() |
Returns the configured exclusive maximum value for float validation.
|
java.lang.Float |
getMaxInclusive() |
Returns the configured inclusive maximum value for float validation.
|
java.lang.Float |
getMinExclusive() |
Returns the configured exclusive minimum value for float validation.
|
java.lang.Float |
getMinInclusive() |
Returns the configured inclusive minimum value for float validation.
|
boolean |
hasFixed() |
Returns true if a fixed value to validate against has been set.
|
void |
setFixed(float fixedValue) |
Sets the fixed value for float validation.
|
void |
setMaxExclusive(float maxValue) |
Sets the maximum (exclusive) value for float validation.
|
void |
setMaxInclusive(float maxValue) |
Sets the maximum (inclusive) value for float validation.
|
void |
setMinExclusive(float minValue) |
Sets the minimum (exclusive) value for float validation.
|
void |
setMinInclusive(float minValue) |
Sets the minimum (inclusive) value for float validation.
|
void |
validate(float d,
ValidationContext context) |
Validates the given Object.
|
void |
validate(java.lang.Object object) |
Validates the given Object.
|
void |
validate(java.lang.Object object,
ValidationContext context) |
Validates the given Object.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addPattern, clearPatterns, getPatterns, hasPattern, isNillable, setNillable, validate
public FloatValidator()
public void clearFixed()
public void clearMax()
public void clearMin()
public java.lang.Float getFixed()
public java.lang.Float getMaxInclusive()
public java.lang.Float getMaxExclusive()
public java.lang.Float getMinInclusive()
public java.lang.Float getMinExclusive()
public boolean hasFixed()
public void setFixed(float fixedValue)
NOTE: If maximum and/or minimum values have been set and the fixed value is not within that max/min range, then no float will pass validation. This is as according to the XML Schema spec.
fixedValue
- the fixed value that a float validated with this validator
must be equal to.public void setMinExclusive(float minValue)
minValue
- the minimum (exclusive) value for float validation.public void setMinInclusive(float minValue)
minValue
- the minimum (inclusive) value for float validation.public void setMaxExclusive(float maxValue)
maxValue
- the maximum (exclusive) value for float validation.public void setMaxInclusive(float maxValue)
maxValue
- the maximum (inclusive) value for float validation.public void validate(float d, ValidationContext context) throws ValidationException
d
- the float to validatecontext
- the ValidationContextValidationException
- if the object fails validation.public void validate(java.lang.Object object) throws ValidationException
object
- the Object to validateValidationException
- if the object fails validation.public void validate(java.lang.Object object, ValidationContext context) throws ValidationException
validate
in interface TypeValidator
validate
in class PatternValidator
object
- the Object to validatecontext
- the ValidationContextValidationException
- if the object fails validation.Intalio Inc. (C) 1999-2008. All rights reserved http://www.intalio.com