diff options
author | Tom Tromey <tromey@gcc.gnu.org> | 2007-01-09 19:58:05 +0000 |
---|---|---|
committer | Tom Tromey <tromey@gcc.gnu.org> | 2007-01-09 19:58:05 +0000 |
commit | 97b8365cafc3a344a22d3980b8ed885f5c6d8357 (patch) | |
tree | 996a5f57d4a68c53473382e45cb22f574cb3e4db /libjava/classpath/java/lang/Double.java | |
parent | c648dedbde727ca3f883bb5fd773aa4af70d3369 (diff) | |
download | gcc-97b8365cafc3a344a22d3980b8ed885f5c6d8357.zip gcc-97b8365cafc3a344a22d3980b8ed885f5c6d8357.tar.gz gcc-97b8365cafc3a344a22d3980b8ed885f5c6d8357.tar.bz2 |
Merged gcj-eclipse branch to trunk.
From-SVN: r120621
Diffstat (limited to 'libjava/classpath/java/lang/Double.java')
-rw-r--r-- | libjava/classpath/java/lang/Double.java | 27 |
1 files changed, 6 insertions, 21 deletions
diff --git a/libjava/classpath/java/lang/Double.java b/libjava/classpath/java/lang/Double.java index 03c5606..c716203 100644 --- a/libjava/classpath/java/lang/Double.java +++ b/libjava/classpath/java/lang/Double.java @@ -1,5 +1,5 @@ /* Double.java -- object wrapper for double - Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2005 + Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -49,10 +49,12 @@ package java.lang; * @author Paul Fisher * @author Andrew Haley (aph@cygnus.com) * @author Eric Blake (ebb9@email.byu.edu) + * @author Tom Tromey (tromey@redhat.com) + * @author Andrew John Hughes (gnu_andrew@member.fsf.org) * @since 1.0 - * @status updated to 1.4 + * @status partly updated to 1.5 */ -public final class Double extends Number implements Comparable +public final class Double extends Number implements Comparable<Double> { /** * Compatible with JDK 1.0+. @@ -98,7 +100,7 @@ public final class Double extends Number implements Comparable * <code>Class</code> object. * @since 1.1 */ - public static final Class TYPE = VMClassLoader.getPrimitiveClass('D'); + public static final Class<Double> TYPE = (Class<Double>) VMClassLoader.getPrimitiveClass('D'); /** * The immutable value of this Double. @@ -254,7 +256,6 @@ public final class Double extends Number implements Comparable * * @param val the value to wrap * @return the <code>Double</code> - * * @since 1.5 */ public static Double valueOf(double val) @@ -575,22 +576,6 @@ public final class Double extends Number implements Comparable } /** - * Behaves like <code>compareTo(Double)</code> unless the Object - * is not an <code>Double</code>. - * - * @param o the object to compare - * @return the comparison - * @throws ClassCastException if the argument is not a <code>Double</code> - * @see #compareTo(Double) - * @see Comparable - * @since 1.2 - */ - public int compareTo(Object o) - { - return compare(value, ((Double) o).value); - } - - /** * Behaves like <code>new Double(x).compareTo(new Double(y))</code>; in * other words this compares two doubles, special casing NaN and zero, * without the overhead of objects. |