TypeValidator
public class DoubleValidator extends PatternValidator implements TypeValidator
double
and java.lang.Double
types.resourceBundle
Constructor | Description |
---|---|
DoubleValidator() |
Creates a new DoubleValidator with no restrictions.
|
Modifier and Type | Method | Description |
---|---|---|
void |
clearFixed() |
Clears the fixed value for this DoubleValidator.
|
void |
clearMax() |
Clears the maximum value for this DoubleValidator.
|
void |
clearMin() |
Clears the minimum value for this DoubleValidator.
|
java.lang.Double |
getFixed() |
Returns the configured fixed value for double validation.
|
java.lang.Double |
getMaxExclusive() |
Returns the configured exclusive maximum value for double validation.
|
java.lang.Double |
getMaxInclusive() |
Returns the configured inclusive maximum value for double validation.
|
java.lang.Double |
getMinExclusive() |
Returns the configured exclusive minimum value for double validation.
|
java.lang.Double |
getMinInclusive() |
Returns the configured inclusive minimum value for double validation.
|
boolean |
hasFixed() |
Returns true if a fixed value to validate against has been set.
|
void |
setFixed(double fixedValue) |
Sets the fixed value for double validation.
|
void |
setMaxExclusive(double maxValue) |
Sets the maximum (exclusive) value for double validation.
|
void |
setMaxInclusive(double maxValue) |
Sets the maximum (inclusive) value for double validation.
|
void |
setMinExclusive(double minValue) |
Sets the minimum (exclusive) value for double validation.
|
void |
setMinInclusive(double minValue) |
Sets the minimum (inclusive) value for double validation.
|
void |
validate(double 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 DoubleValidator()
public void clearFixed()
public void clearMax()
public void clearMin()
public java.lang.Double getFixed()
public java.lang.Double getMaxInclusive()
public java.lang.Double getMaxExclusive()
public java.lang.Double getMinInclusive()
public java.lang.Double getMinExclusive()
public boolean hasFixed()
public void setFixed(double fixedValue)
NOTE: If maximum and/or minimum values have been set and the fixed value is not within that max/min range, then no double will pass validation. This is as according to the XML Schema spec.
fixedValue
- the fixed value that a double validated with this validator
must be equal to.public void setMinExclusive(double minValue)
minValue
- the minimum (exclusive) value for double validation.public void setMinInclusive(double minValue)
minValue
- the minimum (inclusive) value for double validation.public void setMaxExclusive(double maxValue)
maxValue
- the maximum (exclusive) value for double validation.public void setMaxInclusive(double maxValue)
maxValue
- the maximum (inclusive) value for double validation.public void validate(double d, ValidationContext context) throws ValidationException
d
- the double 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