Java Doc for Double.java in  » Apache-Harmony-Java-SE » java-package » java » lang » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Apache Harmony Java SE » java package » java.lang 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   java.lang.Number
      java.lang.Double

Double
final public class Double extends Number implements Comparable<Double>(Code)

Double is the wrapper for the primitive type double.


See Also:   java.lang.Number
since:
   1.0


Field Summary
final public static  doubleMAX_VALUE
    

Constant for the maximum double value, (2 - 2-52/sup>) * 21023.

final public static  doubleMIN_VALUE
    

Constant for the minimum double value, 2-1074.

final public static  doubleNEGATIVE_INFINITY
    

Constant for the Negative Infinity value of the double type.

final public static  doubleNaN
    

Constant for the Not-a-Number (NaN) value of the double type.

final public static  doublePOSITIVE_INFINITY
    

Constant for the Positive Infinity value of the double type.

final public static  intSIZE
    

Constant for the number of bits to represent a double in two's compliment form.

final public static  Class<Double>TYPE
     The java.lang.Class that represents this class.

Constructor Summary
public  Double(double value)
     Constructs a new instance of the receiver which represents the double valued argument.
public  Double(String string)
     Constructs a new instance of this class given a string.

Method Summary
public  bytebyteValue()
    
public static  intcompare(double double1, double double2)
     Compares the two doubles.
public  intcompareTo(Double object)
     Compares the receiver with the Double parameter.
native public static  longdoubleToLongBits(double value)
     Answers the binary representation of the argument, as a long.
native public static  longdoubleToRawLongBits(double value)
     Answers the binary representation of the argument, as a long.
public  doubledoubleValue()
     Answers the receiver's value as a double.
public  booleanequals(Object object)
     Compares the argument to the receiver, and answers true if they represent the same object using a class specific comparison.
public  floatfloatValue()
    
public  inthashCode()
     Answers an integer hash code for the receiver.
public  intintValue()
     Answers the receiver's value as an integer.
public  booleanisInfinite()
     Answers true if the receiver represents an infinite quantity, and false otherwise.
public static  booleanisInfinite(double d)
     Answers true if the argument represents an infinite quantity, and false otherwise.
Parameters:
  d - value to check for infinitness.
public  booleanisNaN()
     Answers true if the receiver does not represent a valid float quantity.
public static  booleanisNaN(double d)
     Answers true if the argument does not represent a valid double quantity.
Parameters:
  d - value to check for numberness.
native public static  doublelongBitsToDouble(long bits)
     Answers a double built from the binary representation given in the argument.
public  longlongValue()
    
public static  doubleparseDouble(String string)
     Answers the double which matches the passed in string.
public  shortshortValue()
    
public static  StringtoHexString(double d)
    

Converts a double into a hexadecimal string representation.


Parameters:
  d - The double to convert.
public  StringtoString()
     Answers a string containing a concise, human-readable description of the receiver.
public static  StringtoString(double d)
     Answers a string containing a printable representation of the argument.
public static  DoublevalueOf(String string)
     Answers the double which matches the passed in string.
public static  DoublevalueOf(double d)
    

Returns a Double instance for the double value passed.


Field Detail
MAX_VALUE
final public static double MAX_VALUE(Code)

Constant for the maximum double value, (2 - 2-52/sup>) * 21023.




MIN_VALUE
final public static double MIN_VALUE(Code)

Constant for the minimum double value, 2-1074.




NEGATIVE_INFINITY
final public static double NEGATIVE_INFINITY(Code)

Constant for the Negative Infinity value of the double type.




NaN
final public static double NaN(Code)

Constant for the Not-a-Number (NaN) value of the double type.




POSITIVE_INFINITY
final public static double POSITIVE_INFINITY(Code)

Constant for the Positive Infinity value of the double type.




SIZE
final public static int SIZE(Code)

Constant for the number of bits to represent a double in two's compliment form.


since:
   1.5



TYPE
final public static Class<Double> TYPE(Code)
The java.lang.Class that represents this class.
since:
   1.1




Constructor Detail
Double
public Double(double value)(Code)
Constructs a new instance of the receiver which represents the double valued argument.
Parameters:
  value - the double to store in the new instance.



Double
public Double(String string) throws NumberFormatException(Code)
Constructs a new instance of this class given a string.
Parameters:
  string - a string representation of a double quantity.
exception:
  NumberFormatException - if the argument could not be parsed as a double quantity.




Method Detail
byteValue
public byte byteValue()(Code)
Answers the byte value which the receiver represents byte the value of the receiver.



compare
public static int compare(double double1, double double2)(Code)
Compares the two doubles. NaN is equal to NaN, and is greater than other double values. 0d is greater than -0d.
Parameters:
  double1 - the first value to compare
Parameters:
  double2 - the second value to compare Returns greater than zero when double1 is greater than double2,zero when double1 equals double2, and less than zero when double1is less than double2



compareTo
public int compareTo(Double object)(Code)
Compares the receiver with the Double parameter. NaN is equal to NaN, and is greater than other double values. 0d is greater than -0d.
Parameters:
  object - the Double to compare to the receiver Returns greater than zero when this.doubleValue() is greater thanobject.doubleValue(), zero when this.doubleValue() equalsobject.doubleValue(), and less than zero when this.doubleValue()is less than object.doubleValue()
throws:
  NullPointerException - if object is null.
since:
   1.2



doubleToLongBits
native public static long doubleToLongBits(double value)(Code)
Answers the binary representation of the argument, as a long.
Parameters:
  value - The double value to convert the bits of the double.



doubleToRawLongBits
native public static long doubleToRawLongBits(double value)(Code)
Answers the binary representation of the argument, as a long.
Parameters:
  value - The double value to convert the bits of the double.



doubleValue
public double doubleValue()(Code)
Answers the receiver's value as a double. the receiver's value



equals
public boolean equals(Object object)(Code)
Compares the argument to the receiver, and answers true if they represent the same object using a class specific comparison. For Doubles, the check verifies that the receiver's value's bit pattern matches the bit pattern of the argument, which must also be a Double.
Parameters:
  object - the object to compare with this object true if the object is the same as this objectfalse if it is different from this object
See Also:   Double.hashCode



floatValue
public float floatValue()(Code)
Answers the float value which the receiver represents float the value of the receiver.



hashCode
public int hashCode()(Code)
Answers an integer hash code for the receiver. Any two objects which answer true when passed to equals must answer the same value for this method. the receiver's hash
See Also:   Double.equals



intValue
public int intValue()(Code)
Answers the receiver's value as an integer. the receiver's value as an integer



isInfinite
public boolean isInfinite()(Code)
Answers true if the receiver represents an infinite quantity, and false otherwise. true if the argument is positive or negativeinfinity false if it is not an infinite value



isInfinite
public static boolean isInfinite(double d)(Code)
Answers true if the argument represents an infinite quantity, and false otherwise.
Parameters:
  d - value to check for infinitness. true if the argument is positive or negativeinfinity false if it is not an infinite value



isNaN
public boolean isNaN()(Code)
Answers true if the receiver does not represent a valid float quantity. true if the argument is Not A Numberfalse if it is a (potentially infinite) floatnumber



isNaN
public static boolean isNaN(double d)(Code)
Answers true if the argument does not represent a valid double quantity.
Parameters:
  d - value to check for numberness. true if the argument is Not A Numberfalse if it is a (potentially infinite) doublenumber



longBitsToDouble
native public static double longBitsToDouble(long bits)(Code)
Answers a double built from the binary representation given in the argument.
Parameters:
  bits - the bits of the double the double which matches the bits



longValue
public long longValue()(Code)
Answers the long value which the receiver represents long the value of the receiver.



parseDouble
public static double parseDouble(String string) throws NumberFormatException(Code)
Answers the double which matches the passed in string. NumberFormatException is thrown if the string does not represent a valid double.
Parameters:
  string - the value to convert a double which would print as the argument



shortValue
public short shortValue()(Code)
Answers the short value which the receiver represents short the value of the receiver.



toHexString
public static String toHexString(double d)(Code)

Converts a double into a hexadecimal string representation.


Parameters:
  d - The double to convert. The hexadecimal string representation of f.
since:
   1.5



toString
public String toString()(Code)
Answers a string containing a concise, human-readable description of the receiver. a printable representation for the receiver.



toString
public static String toString(double d)(Code)
Answers a string containing a printable representation of the argument.
Parameters:
  d - the double to print a printable representation of the argument.



valueOf
public static Double valueOf(String string) throws NumberFormatException(Code)
Answers the double which matches the passed in string. NumberFormatException is thrown if the string does not represent a valid double.
Parameters:
  string - the value to convert a double which would print as the argument



valueOf
public static Double valueOf(double d)(Code)

Returns a Double instance for the double value passed. This method is preferred over the constructor, as this method may maintain a cache of instances.


Parameters:
  d - The double value. A Double instance.
since:
   1.5



Methods inherited from java.lang.Number
public byte byteValue()(Code)(Java Doc)
abstract public double doubleValue()(Code)(Java Doc)
abstract public float floatValue()(Code)(Java Doc)
abstract public int intValue()(Code)(Java Doc)
abstract public long longValue()(Code)(Java Doc)
public short shortValue()(Code)(Java Doc)

Methods inherited from java.lang.Object
protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object object)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final public Class<? extends Object> getClass()(Code)(Java Doc)
public int hashCode()(Code)(Java Doc)
final public void notify()(Code)(Java Doc)
final public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final public void wait(long millis, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait(long millis) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.