org.exolab.castor.xml.validators
Class LongValidator
- TypeValidator
public class LongValidator
The Integer Validation class. This class handles validation
for the integer type as well as all integer derived types
such as positive-integer and negative-integer
$Revision: 1.2 $ $Date: 2003/03/03 09:57:21 $
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(Object object) - Validates the given Object
|
void | validate(Object object, ValidationContext context) - Validates the given Object
|
void | validate(long value, ValidationContext context)
|
LongValidator
public LongValidator()
Creates a new LongValidator with no restrictions
clearFixed
public void clearFixed()
Clears the fixed value for this LongValidator
clearMax
public void clearMax()
Clears the maximum value for this LongValidator
clearMin
public void clearMin()
Clears the minimum value for this LongValidator
getFixed
public Long getFixed()
Returns the fixed value that longs validated with this
validator must be equal to. A null value is returned
if no fixed value has been specified.
- the fixed value to validate against.
getMaxInclusive
public Long getMaxInclusive()
Returns the maximum value that longs validated with this
validator must be equal to or less than. A null value
is returned if no maximum value has been specified.
- the maximum inclusive value to validate against.
getMinInclusive
public Long getMinInclusive()
Returns the minimum value that longs validated with this
validator must be equal to or greater than. A null value
is returned if no minimum value has been specified.
- the minimum inclusive value to validate against.
hasFixed
public boolean hasFixed()
Returns true if a fixed value, to validate against, has been
set.
- true if a fixed value has been set.
setFixed
public void setFixed(long fixedValue)
Sets the fixed value that integers validated with this
validated must be equal to
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
setMaxExclusive
public void setMaxExclusive(long maxValue)
Sets the maximum value that longs validated with this
validator must be less than
maxValue
- the maximum value that a long validated
with this validator must be less than
setMaxInclusive
public void setMaxInclusive(long maxValue)
Sets the maximum value that longs validated with this
validator are allowed to be
maxValue
- the maximum value that a long validated
with this validator may be
setMinExclusive
public void setMinExclusive(long minValue)
Sets the minimum value that longs validated with this
validator must be greater than
minValue
- the minimum value that a long validated with this
validator must be greater than
setMinInclusive
public void setMinInclusive(long minValue)
Sets the minimum value that longs validated with this
validator are allowed to be
minValue
- the minimum value that a long validated with this
validator may be
validate
public void validate(Object object)
throws ValidationException
Validates the given Object
object
- the Object to validate
Intalio Inc. (C) 1999-2003. All rights reserved http://www.intalio.com