/[classpath]/classpath/java/lang/Float.java
ViewVC logotype

Diff of /classpath/java/lang/Float.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.28 by mkoch, Sat Apr 17 17:08:22 2004 UTC revision 1.28.2.1 by tromey, Sat Oct 9 22:39:55 2004 UTC
# Line 1  Line 1 
1  /* Float.java -- object wrapper for float  /* Float.java -- object wrapper for float
2     Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003     Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004
3     Free Software Foundation, Inc.     Free Software Foundation, Inc.
4    
5  This file is part of GNU Classpath.  This file is part of GNU Classpath.
# Line 52  package java.lang; Line 52  package java.lang;
52   * @since 1.0   * @since 1.0
53   * @status updated to 1.4   * @status updated to 1.4
54   */   */
55  public final class Float extends Number implements Comparable  public final class Float extends Number implements Comparable<Float>
56  {  {
57    /**    /**
58     * Compatible with JDK 1.0+.     * Compatible with JDK 1.0+.
# Line 91  public final class Float extends Number Line 91  public final class Float extends Number
91     * <code>Class</code> object.     * <code>Class</code> object.
92     * @since 1.1     * @since 1.1
93     */     */
94    public static final Class TYPE = VMClassLoader.getPrimitiveClass('F');    public static final Class<Float> TYPE = VMClassLoader.getPrimitiveClass('F');
95    
96      /**
97       * The number of bits needed to represent a <code>float</code>.
98       * @since 1.5
99       */
100      public static final int SIZE = 32;
101    
102    /**    /**
103     * The immutable value of this Float.     * The immutable value of this Float.
# Line 192  public final class Float extends Number Line 198  public final class Float extends Number
198    }    }
199    
200    /**    /**
201       * Returns a <code>Float</code> object wrapping the value.
202       * In contrast to the <code>Float</code> constructor, this method
203       * may cache some values.  It is used by boxing conversion.
204       *
205       * @param val the value to wrap
206       * @return the <code>Float</code>
207       */
208      public static Float valueOf(float val)
209      {
210        // We don't actually cache, but we could.
211        return new Float(val);
212      }
213    
214      /**
215     * Parse the specified <code>String</code> as a <code>float</code>. The     * Parse the specified <code>String</code> as a <code>float</code>. The
216     * extended BNF grammar is as follows:<br>     * extended BNF grammar is as follows:<br>
217     * <pre>     * <pre>

Legend:
Removed from v.1.28  
changed lines
  Added in v.1.28.2.1

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26