public class DecimalValidator extends PatternValidator implements TypeValidator
PatternValidator.DefaultRegExpEvaluator| Constructor and Description |
|---|
DecimalValidator()
Creates a new DecimalValidator with no restrictions
|
| Modifier and Type | Method and Description |
|---|---|
void |
clearMax()
Clears the maximum value for this DecimalValidator
|
void |
clearMin()
Clears the minimum value for this DecimalValidator
|
java.math.BigDecimal |
getFixed()
Returns the fixed value that decimals validated with this
validator must be equal to.
|
java.math.BigDecimal |
getMaxInclusive()
Returns the maximum value that decimals validated with this
validator must be equal to or less than.
|
java.math.BigDecimal |
getMinInclusive()
Returns the minimum value that decimals validated with this
validator must be equal to or greater than.
|
boolean |
hasFixed()
Returns true if a fixed value, to validate against, has been
set.
|
void |
setFixed(java.math.BigDecimal fixed)
Sets the fixed value the decimal to validate must
be equal to.
|
void |
setFractionDigits(int fractionDig)
Sets the fractionDigits facet for this decimal validator.
|
void |
setMaxExclusive(java.math.BigDecimal maxValue)
Sets the maximum value that decimals validated with this
validator must be less than
|
void |
setMaxInclusive(java.math.BigDecimal maxValue)
Sets the maximum value that decimals validated with this
validator are allowed to be
|
void |
setMinExclusive(java.math.BigDecimal minValue)
Sets the minimum value that decimals validated with this
validator must be greater than
|
void |
setMinInclusive(java.math.BigDecimal minValue)
Sets the minimum value that decimals validated with this
validator are allowed to be
|
void |
setTotalDigits(int totalDig)
Sets the totalDigits facet for this decimal validator.
|
void |
validate(java.math.BigDecimal bd,
ValidationContext context) |
void |
validate(java.lang.Object object)
Validates the given Object
|
void |
validate(java.lang.Object object,
ValidationContext context)
Validates the given Object
|
getPattern, hasPattern, isNillable, setNillable, setPattern, validatepublic DecimalValidator()
public void clearMax()
public void clearMin()
public java.math.BigDecimal getFixed()
public java.math.BigDecimal getMaxInclusive()
public java.math.BigDecimal getMinInclusive()
public boolean hasFixed()
public void setMinExclusive(java.math.BigDecimal minValue)
minValue - the minimum value an decimal validated with this
validator must be greater thanpublic void setMinInclusive(java.math.BigDecimal minValue)
minValue - the minimum value an decimal validated with this
validator may bepublic void setMaxExclusive(java.math.BigDecimal maxValue)
maxValue - the maximum value an decimal validated with this
validator must be less thanpublic void setMaxInclusive(java.math.BigDecimal maxValue)
maxValue - the maximum value an decimal validated with this
validator may bepublic void setTotalDigits(int totalDig)
totalDig - the value of totalDigits (must be >0)public void setFractionDigits(int fractionDig)
fractionDig - the value of fractionDigits (must be >=0)public void setFixed(java.math.BigDecimal fixed)
fixed - the fixed valuepublic void validate(java.math.BigDecimal bd,
ValidationContext context)
throws ValidationException
ValidationExceptionpublic void validate(java.lang.Object object)
throws ValidationException
object - the Object to validateValidationExceptionpublic void validate(java.lang.Object object,
ValidationContext context)
throws ValidationException
validate in interface TypeValidatorvalidate in class PatternValidatorobject - the Object to validatecontext - the ValidationContextValidationExceptionIntalio Inc. (C) 1999-2006. All rights reserved http://www.intalio.com