1.1 --- a/emul/src/main/java/java/lang/Double.java Sun Sep 30 18:29:37 2012 -0700
1.2 +++ b/emul/src/main/java/java/lang/Double.java Tue Oct 16 18:04:11 2012 +0200
1.3 @@ -25,6 +25,8 @@
1.4
1.5 package java.lang;
1.6
1.7 +import org.apidesign.bck2brwsr.core.JavaScriptBody;
1.8 +
1.9 /**
1.10 * The {@code Double} class wraps a value of the primitive type
1.11 * {@code double} in an object. An object of type
1.12 @@ -188,6 +190,7 @@
1.13 * @param d the {@code double} to be converted.
1.14 * @return a string representation of the argument.
1.15 */
1.16 + @JavaScriptBody(args="d", body="return d.toString();")
1.17 public static String toString(double d) {
1.18 throw new UnsupportedOperationException();
1.19 }
1.20 @@ -497,6 +500,7 @@
1.21 * @throws NumberFormatException if the string does not contain a
1.22 * parsable number.
1.23 */
1.24 + @JavaScriptBody(args="s", body="return parseFloat(s);")
1.25 public static Double valueOf(String s) throws NumberFormatException {
1.26 throw new UnsupportedOperationException();
1.27 // return new Double(FloatingDecimal.readJavaFormatString(s).doubleValue());
1.28 @@ -534,6 +538,7 @@
1.29 * @see java.lang.Double#valueOf(String)
1.30 * @since 1.2
1.31 */
1.32 + @JavaScriptBody(args="s", body="return parseFloat(s);")
1.33 public static double parseDouble(String s) throws NumberFormatException {
1.34 throw new UnsupportedOperationException();
1.35 // return FloatingDecimal.readJavaFormatString(s).doubleValue();