Class StringToDouble

  • Direct Known Subclasses:
    StringToDouble11

    public class StringToDouble
    extends StringConverter
    This class converts a string to an xs:double according to the rules in XML Schema 1.0
    • Constructor Detail

      • StringToDouble

        protected StringToDouble()
    • Method Detail

      • getInstance

        public static StringToDouble getInstance()
        Get the singleton instance
        Returns:
        the singleton instance of this class
      • stringToNumber

        public double stringToNumber​(java.lang.CharSequence s)
                              throws java.lang.NumberFormatException
        Convert a string to a double.
        Parameters:
        s - the String to be converted
        Returns:
        a double representing the value of the String
        Throws:
        java.lang.NumberFormatException - if the value cannot be converted
      • signedPositiveInfinity

        protected double signedPositiveInfinity()
      • convertString

        public ConversionResult convertString​(java.lang.CharSequence input)
        Convert a string to the target type of this converter.
        Specified by:
        convertString in class StringConverter
        Parameters:
        input - the string to be converted
        Returns:
        either an AtomicValue of the appropriate type for this converter (if conversion succeeded), or a ValidationFailure if conversion failed.