src/share/classes/java/lang/Double.java

Print this page

        

*** 199,209 **** * * @param d the {@code double} to be converted. * @return a string representation of the argument. */ public static String toString(double d) { ! return new FloatingDecimal(d).toJavaFormatString(); } /** * Returns a hexadecimal string representation of the * {@code double} argument. All characters mentioned below --- 199,209 ---- * * @param d the {@code double} to be converted. * @return a string representation of the argument. */ public static String toString(double d) { ! return FloatingDecimal.toJavaFormatString(d); } /** * Returns a hexadecimal string representation of the * {@code double} argument. All characters mentioned below
*** 507,517 **** * represented by the {@code String} argument. * @throws NumberFormatException if the string does not contain a * parsable number. */ public static Double valueOf(String s) throws NumberFormatException { ! return new Double(FloatingDecimal.readJavaFormatString(s).doubleValue()); } /** * Returns a {@code Double} instance representing the specified * {@code double} value. --- 507,517 ---- * represented by the {@code String} argument. * @throws NumberFormatException if the string does not contain a * parsable number. */ public static Double valueOf(String s) throws NumberFormatException { ! return new Double(parseDouble(s)); } /** * Returns a {@code Double} instance representing the specified * {@code double} value.
*** 543,553 **** * a parsable {@code double}. * @see java.lang.Double#valueOf(String) * @since 1.2 */ public static double parseDouble(String s) throws NumberFormatException { ! return FloatingDecimal.readJavaFormatString(s).doubleValue(); } /** * Returns {@code true} if the specified number is a * Not-a-Number (NaN) value, {@code false} otherwise. --- 543,553 ---- * a parsable {@code double}. * @see java.lang.Double#valueOf(String) * @since 1.2 */ public static double parseDouble(String s) throws NumberFormatException { ! return FloatingDecimal.parseDouble(s); } /** * Returns {@code true} if the specified number is a * Not-a-Number (NaN) value, {@code false} otherwise.