org.exolab.castor.xml.validators
public class IntegerValidator extends PatternValidator implements TypeValidator
Version: $Revision: 5951 $ $Date: 2006-04-25 15:08:23 -0600 (Tue, 25 Apr 2006) $
Constructor Summary | |
---|---|
IntegerValidator()
Creates a new IntegerValidator with no restrictions
|
Method Summary | |
---|---|
void | clearFixed()
Clears the fixed value for this IntegerValidator
|
void | clearMax()
Clears the maximum value for this IntegerValidator
|
void | clearMin()
Clears the minimum value for this IntegerValidator
|
Integer | getFixed()
Returns the fixed value that integers validated with this
validator must be equal to. |
Integer | getMaxInclusive()
Returns the maximum value that integers validated with this
validator must be equal to or less than. |
Integer | getMinInclusive()
Returns the minimum value that integers validated with this
validator must be equal to or greater than. |
Integer | getTotalDigits()
Returns the total number of digits that integers validated with this
validator must have. |
boolean | hasFixed()
Returns true if a fixed value, to validate against, has been
set.
|
void | setFixed(int fixedValue)
Sets the fixed value that integers validated with this
validated must be equal to |
void | setFixed(Integer fixedValue) |
void | setMaxExclusive(int maxValue)
Sets the maximum value that integers validated with this
validator must be less than |
void | setMaxInclusive(int maxValue)
Sets the maximum value that integers validated with this
validator are allowed to be |
void | setMinExclusive(int minValue)
Sets the minimum value that integers validated with this
validator must be greater than |
void | setMinInclusive(int minValue)
Sets the minimum value that integers validated with this
validator are allowed to be |
void | setTotalDigits(int totalDig)
Sets the totalDigits facet for this Integer type. |
void | validate(int i, ValidationContext context) |
void | validate(Object object)
Validates the given Object
|
void | validate(Object object, ValidationContext context)
Validates the given Object
|
Returns: the fixed value to validate against.
Returns: the maximum inclusive value to validate against.
Returns: the minimum inclusive value to validate against.
Returns: the total number of digits
Returns: true if a fixed value has been set.
Parameters: fixedValue the fixed value an integer validated with
this validator must be equal to.
NOTE: Using Fixed values takes preceedence over using max and mins,
and is really the same as setting both max-inclusive and
min-inclusive to the same value
Parameters: maxValue the maximum value an integer validated with this validator must be less than
Parameters: maxValue the maximum value an integer validated with this validator may be
Parameters: minValue the minimum value an integer validated with this validator must be greater than
Parameters: minValue the minimum value an integer validated with this validator may be
Parameters: totalDig the value of totalDigits (must be >0)
Parameters: object the Object to validate
Parameters: object the Object to validate context the ValidationContext