summaryrefslogtreecommitdiffstats
path: root/libjava/classpath/java/lang/Float.java
diff options
context:
space:
mode:
Diffstat (limited to 'libjava/classpath/java/lang/Float.java')
-rw-r--r--libjava/classpath/java/lang/Float.java27
1 files changed, 6 insertions, 21 deletions
diff --git a/libjava/classpath/java/lang/Float.java b/libjava/classpath/java/lang/Float.java
index dcd5b221197..1e85922be72 100644
--- a/libjava/classpath/java/lang/Float.java
+++ b/libjava/classpath/java/lang/Float.java
@@ -1,5 +1,5 @@
/* Float.java -- object wrapper for float
- 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 Float extends Number implements Comparable
+public final class Float extends Number implements Comparable<Float>
{
/**
* Compatible with JDK 1.0+.
@@ -91,7 +93,7 @@ public final class Float extends Number implements Comparable
* <code>Class</code> object.
* @since 1.1
*/
- public static final Class TYPE = VMClassLoader.getPrimitiveClass('F');
+ public static final Class<Float> TYPE = (Class<Float>) VMClassLoader.getPrimitiveClass('F');
/**
* The number of bits needed to represent a <code>float</code>.
@@ -281,7 +283,6 @@ public final class Float extends Number implements Comparable
*
* @param val the value to wrap
* @return the <code>Float</code>
- *
* @since 1.5
*/
public static Float valueOf(float val)
@@ -584,22 +585,6 @@ public final class Float extends Number implements Comparable
}
/**
- * Behaves like <code>compareTo(Float)</code> unless the Object
- * is not an <code>Float</code>.
- *
- * @param o the object to compare
- * @return the comparison
- * @throws ClassCastException if the argument is not a <code>Float</code>
- * @see #compareTo(Float)
- * @see Comparable
- * @since 1.2
- */
- public int compareTo(Object o)
- {
- return compare(value, ((Float) o).value);
- }
-
- /**
* Behaves like <code>new Float(x).compareTo(new Float(y))</code>; in
* other words this compares two floats, special casing NaN and zero,
* without the overhead of objects.
OpenPOWER on IntegriCloud