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