org.exolab.castor.xml.validators
public class LongValidator extends PatternValidator implements TypeValidator
Version: $Revision: 1.2 $ $Date: 2003/03/03 09:57:21 $
Constructor Summary | |
---|---|
LongValidator()
Creates a new LongValidator with no restrictions
|
Method Summary | |
---|---|
void | clearFixed()
Clears the fixed value for this LongValidator
|
void | clearMax()
Clears the maximum value for this LongValidator
|
void | clearMin()
Clears the minimum value for this LongValidator
|
Long | getFixed()
Returns the fixed value that longs validated with this
validator must be equal to. |
Long | getMaxInclusive()
Returns the maximum value that longs validated with this
validator must be equal to or less than. |
Long | getMinInclusive()
Returns the minimum value that longs 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(long fixedValue)
Sets the fixed value that integers validated with this
validated must be equal to |
void | setMaxExclusive(long maxValue)
Sets the maximum value that longs validated with this
validator must be less than |
void | setMaxInclusive(long maxValue)
Sets the maximum value that longs validated with this
validator are allowed to be |
void | setMinExclusive(long minValue)
Sets the minimum value that longs validated with this
validator must be greater than |
void | setMinInclusive(long minValue)
Sets the minimum value that longs validated with this
validator are allowed to be |
void | validate(long value, 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: true if a fixed value has been set.
Parameters: fixedValue the fixed value that a long 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 that a long validated with this validator must be less than
Parameters: maxValue the maximum value that a long validated with this validator may be
Parameters: minValue the minimum value that a long validated with this validator must be greater than
Parameters: minValue the minimum value that a long validated with this validator may be
Parameters: object the Object to validate
Parameters: object the Object to validate context the ValidationContext