org.exolab.castor.xml.validators
Class FloatValidator

java.lang.Object
  extended by org.exolab.castor.xml.validators.PatternValidator
      extended by org.exolab.castor.xml.validators.FloatValidator
All Implemented Interfaces:
TypeValidator

public class FloatValidator
extends PatternValidator
implements TypeValidator

The Float Validation class. This class handles validation for the float type.

Version:
$Revision: 1.2 $ $Date: 2003/03/03 09:57:21 $
Author:
Arnaud Blandin

Nested Class Summary
 
Nested classes/interfaces inherited from class org.exolab.castor.xml.validators.PatternValidator
PatternValidator.DefaultRegExpEvaluator
 
Constructor Summary
FloatValidator()
          Creates a new FloatValidator with no restrictions
 
Method Summary
 void setFixed(float fixed)
          Sets the fixed value the float to validate must be equal to.
 void setFixed(java.lang.Float fixed)
          Sets the fixed value the float to validate must be equal to.
 void setMaxExclusive(float maxValue)
          Sets the maximum value that decimals validated with this validator must be less than
 void setMaxExclusive(java.lang.Float maxValue)
          Sets the maximum value that decimals validated with this validator must be less than
 void setMaxInclusive(float maxValue)
          Sets the maximum value that decimals validated with this validator are allowed to be
 void setMaxInclusive(java.lang.Float maxValue)
          Sets the maximum value that decimals validated with this validator are allowed to be
 void setMinExclusive(float minValue)
          Sets the minimum value that floats validated with this validator must be greater than
 void setMinExclusive(java.lang.Float minValue)
          Sets the minimum value that decimals validated with this validator must be greater than
 void setMinInclusive(float minValue)
          Sets the minimum value that decimals validated with this validator are allowed to be
 void setMinInclusive(java.lang.Float minValue)
          Sets the minimum value that decimals validated with this validator are allowed to be
 void validate(float d, ValidationContext context)
           
 void validate(java.lang.Object object)
          Validates the given Object
 void validate(java.lang.Object object, ValidationContext context)
          Validates the given Object
 
Methods inherited from class org.exolab.castor.xml.validators.PatternValidator
getPattern, hasPattern, isNillable, setNillable, setPattern, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FloatValidator

public FloatValidator()
Creates a new FloatValidator with no restrictions

Method Detail

setFixed

public void setFixed(float fixed)
Sets the fixed value the float to validate must be equal to.

Parameters:
fixed - the fixed value

setMinExclusive

public void setMinExclusive(float minValue)
Sets the minimum value that floats validated with this validator must be greater than

Parameters:
minValue - the minimum value an float validated with this validator must be greater than

setMinInclusive

public void setMinInclusive(float minValue)
Sets the minimum value that decimals validated with this validator are allowed to be

Parameters:
minValue - the minimum value an floatvalidated with this validator may be

setMaxExclusive

public void setMaxExclusive(float maxValue)
Sets the maximum value that decimals validated with this validator must be less than

Parameters:
maxValue - the maximum value an floatvalidated with this validator must be less than

setMaxInclusive

public void setMaxInclusive(float maxValue)
Sets the maximum value that decimals validated with this validator are allowed to be

Parameters:
maxValue - the maximum value an floatvalidated with this validator may be

setFixed

public void setFixed(java.lang.Float fixed)
Sets the fixed value the float to validate must be equal to.

Parameters:
fixed - the fixed value

setMinExclusive

public void setMinExclusive(java.lang.Float minValue)
Sets the minimum value that decimals validated with this validator must be greater than

Parameters:
minValue - the minimum value an float validated with this validator must be greater than

setMinInclusive

public void setMinInclusive(java.lang.Float minValue)
Sets the minimum value that decimals validated with this validator are allowed to be

Parameters:
minValue - the minimum value an float validated with this validator may be

setMaxExclusive

public void setMaxExclusive(java.lang.Float maxValue)
Sets the maximum value that decimals validated with this validator must be less than

Parameters:
maxValue - the maximum value an float validated with this validator must be less than

setMaxInclusive

public void setMaxInclusive(java.lang.Float maxValue)
Sets the maximum value that decimals validated with this validator are allowed to be

Parameters:
maxValue - the maximum value an float validated with this validator may be

validate

public void validate(float d,
                     ValidationContext context)
              throws ValidationException
Throws:
ValidationException

validate

public void validate(java.lang.Object object)
              throws ValidationException
Validates the given Object

Parameters:
object - the Object to validate
Throws:
ValidationException

validate

public void validate(java.lang.Object object,
                     ValidationContext context)
              throws ValidationException
Validates the given Object

Specified by:
validate in interface TypeValidator
Overrides:
validate in class PatternValidator
Parameters:
object - the Object to validate
context - the ValidationContext
Throws:
ValidationException


Intalio Inc. (C) 1999-2004. All rights reserved http://www.intalio.com