Class IntegerValidator
- java.lang.Object
-
- org.sourceid.saml20.adapter.gui.validation.impl.IntegerValidator
-
- All Implemented Interfaces:
Serializable,FieldValidator
public class IntegerValidator extends Object implements FieldValidator
TheIntegerValidatorclass validates a 4-byteInteger. Optionally, it allows users to specify a range in the constructor.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description IntegerValidator()Constructs aIntegerValidatorwith no specific range.IntegerValidator(int lowerBound, int upperBound)Constructs aIntegerValidatorwith 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 4-byte integer 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
-
IntegerValidator
public IntegerValidator()
Constructs aIntegerValidatorwith no specific range.
-
IntegerValidator
public IntegerValidator(int lowerBound, int upperBound)Constructs aIntegerValidatorwith 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 4-byte integer 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.
-
-