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

Diff of /classpath/java/lang/Double.java

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

revision 1.34 by mkoch, Sat Apr 17 17:08:22 2004 UTC revision 1.34.2.1 by tromey, Sat Oct 9 22:39:55 2004 UTC
# Line 1  Line 1 
1  /* Double.java -- object wrapper for double  /* Double.java -- object wrapper for double
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 53  import gnu.classpath.Configuration; Line 53  import gnu.classpath.Configuration;
53   * @since 1.0   * @since 1.0
54   * @status updated to 1.4   * @status updated to 1.4
55   */   */
56  public final class Double extends Number implements Comparable  public final class Double extends Number implements Comparable<Double>
57  {  {
58    /**    /**
59     * Compatible with JDK 1.0+.     * Compatible with JDK 1.0+.
# Line 93  public final class Double extends Number Line 93  public final class Double extends Number
93     * <code>Class</code> object.     * <code>Class</code> object.
94     * @since 1.1     * @since 1.1
95     */     */
96    public static final Class TYPE = VMClassLoader.getPrimitiveClass('D');    public static final Class<Double> TYPE = VMClassLoader.getPrimitiveClass('D');
97    
98      /**
99       * The number of bits needed to represent a <code>double</code>.
100       * @since 1.5
101       */
102      public static final int SIZE = 64;
103    
104    /**    /**
105     * The immutable value of this Double.     * The immutable value of this Double.
# Line 195  public final class Double extends Number Line 201  public final class Double extends Number
201    }    }
202    
203    /**    /**
204       * Returns a <code>Double</code> object wrapping the value.
205       * In contrast to the <code>Double</code> constructor, this method
206       * may cache some values.  It is used by boxing conversion.
207       *
208       * @param val the value to wrap
209       * @return the <code>Double</code>
210       */
211      public static Double valueOf(double val)
212      {
213        // We don't actually cache, but we could.
214        return new Double(val);
215      }
216    
217      /**
218     * Parse the specified <code>String</code> as a <code>double</code>. The     * Parse the specified <code>String</code> as a <code>double</code>. The
219     * extended BNF grammar is as follows:<br>     * extended BNF grammar is as follows:<br>
220     * <pre>     * <pre>

Legend:
Removed from v.1.34  
changed lines
  Added in v.1.34.2.1

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