From 8f523f3a1047919d3563daf1ef47ba87336ebe89 Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Tue, 15 Nov 2005 23:20:01 +0000 Subject: Imported GNU Classpath 0.19 + gcj-import-20051115. * sources.am: Regenerated. * Makefile.in: Likewise. * scripts/makemake.tcl: Use glob -nocomplain. From-SVN: r107049 --- libjava/classpath/java/lang/Double.java | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) (limited to 'libjava/classpath/java/lang/Double.java') diff --git a/libjava/classpath/java/lang/Double.java b/libjava/classpath/java/lang/Double.java index 4fa47f46ddd..26b398bb695 100644 --- a/libjava/classpath/java/lang/Double.java +++ b/libjava/classpath/java/lang/Double.java @@ -38,7 +38,6 @@ exception statement from your version. */ package java.lang; -import gnu.classpath.Configuration; /** * Instances of class Double represent primitive @@ -89,6 +88,12 @@ public final class Double extends Number implements Comparable public static final double NaN = 0.0 / 0.0; /** + * The number of bits needed to represent a double. + * @since 1.5 + */ + public static final int SIZE = 64; + + /** * The primitive type double is represented by this * Class object. * @since 1.1 @@ -168,6 +173,22 @@ public final class Double extends Number implements Comparable } /** + * Returns a Double object wrapping the value. + * In contrast to the Double constructor, this method + * may cache some values. It is used by boxing conversion. + * + * @param val the value to wrap + * @return the Double + * + * @since 1.5 + */ + public static Double valueOf(double val) + { + // We don't actually cache, but we could. + return new Double(val); + } + + /** * Create a new Double object using the String. * * @param s the String to convert -- cgit v1.2.3