public class DoubleValidator extends Object implements FieldValidator
DoubleValidator
class validates a string
representing a double (64-bit). Optionally, it allows users to
specify a range in the constructor.Constructor and Description |
---|
DoubleValidator()
Constructs a
DoubleValidator with no specific
range. |
DoubleValidator(double lowerBound,
double upperBound)
Constructs a
DoubleValidator with the
specified range [lowerBound, upperBound]. |
Modifier and Type | Method and Description |
---|---|
void |
validate(Field field)
Validate if the fieldValue string represents a valid
double and the value is within the specified boundary.
|
public DoubleValidator()
DoubleValidator
with no specific
range.public DoubleValidator(double lowerBound, double upperBound)
DoubleValidator
with the
specified range [lowerBound, upperBound].lowerBound
- the lower bound of the range.upperBound
- the upper bound of the range.public void validate(Field field) throws ValidationException
validate
in interface FieldValidator
field
- the field (name and value) to validate.ValidationException
- if the field is invalid.Copyright 2019 Ping Identity Corp. All rights reserved.