Class DoubleValidator
- java.lang.Object
-
- org.sourceid.saml20.adapter.gui.validation.impl.DoubleValidator
-
- All Implemented Interfaces:
Serializable,FieldValidator
public class DoubleValidator extends Object implements FieldValidator
TheDoubleValidatorclass validates a string representing a double (64-bit). Optionally, it allows users to specify a range in the constructor.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DoubleValidator()Constructs aDoubleValidatorwith no specific range.DoubleValidator(double lowerBound, double upperBound)Constructs aDoubleValidatorwith the specified range [lowerBound, upperBound].
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidvalidate(Field field)Validate if the fieldValue string represents a valid double and the value is within the specified boundary.-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.sourceid.saml20.adapter.gui.validation.FieldValidator
isExternalValidator
-
-
-
-
Constructor Detail
-
DoubleValidator
public DoubleValidator()
Constructs aDoubleValidatorwith no specific range.
-
DoubleValidator
public DoubleValidator(double lowerBound, double upperBound)Constructs aDoubleValidatorwith the specified range [lowerBound, upperBound].- Parameters:
lowerBound- the lower bound of the range.upperBound- the upper bound of the range.
-
-
Method Detail
-
validate
public void validate(Field field) throws ValidationException
Validate if the fieldValue string represents a valid double and the value is within the specified boundary.- Specified by:
validatein interfaceFieldValidator- Parameters:
field- the field (name and value) to validate.- Throws:
ValidationException- if the field is invalid.
-
-