Class DoubleValidator

    • Constructor Detail

      • DoubleValidator

        public DoubleValidator()
        Constructs a DoubleValidator with no specific range.
      • DoubleValidator

        public DoubleValidator​(double lowerBound,
                               double upperBound)
        Constructs a DoubleValidator with 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:
        validate in interface FieldValidator
        Parameters:
        field - the field (name and value) to validate.
        Throws:
        ValidationException - if the field is invalid.