Java Doc for Float.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.Float

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

Float is the wrapper for the primitive type float.


See Also:   java.lang.Number
since:
   1.0


Field Summary
final public static  floatMAX_VALUE
    

Constant for the maximum float value, (2 - 2-23) * 2127.

final public static  floatMIN_VALUE
    

Constant for the minimum float value, 2-149.

final public static  floatNEGATIVE_INFINITY
    

Constant for the Negative Infinity value of the float type.

final public static  floatNaN
    

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

final public static  floatPOSITIVE_INFINITY
    

Constant for the Positive Infinity value of the float type.

final public static  intSIZE
    

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

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

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

Method Summary
public  bytebyteValue()
    
public static  intcompare(float float1, float float2)
     Compares the two floats.
public  intcompareTo(Float object)
     Compares the receiver with the Float parameter.
public  doubledoubleValue()
    
public  booleanequals(Object object)
     Compares the argument to the receiver, and answers true if they represent the same object using a class specific comparison.
native public static  intfloatToIntBits(float value)
     Answers the binary representation of the argument, as an int.
native public static  intfloatToRawIntBits(float value)
     Answers the binary representation of the argument, as an int.
public  floatfloatValue()
     Answers the receiver's value as a float.
public  inthashCode()
     Answers an integer hash code for the receiver.
native public static  floatintBitsToFloat(int bits)
     Answers a float built from the binary representation given in the argument.
public  intintValue()
    
public  booleanisInfinite()
     Answers true if the receiver represents an infinite quantity, and false otherwise.
public static  booleanisInfinite(float f)
     Answers true if the argument represents an infinite quantity, and false otherwise.
Parameters:
  f - value to check for infinitness.
public  booleanisNaN()
     Answers true if the receiver does not represent a valid float quantity.
public static  booleanisNaN(float f)
     Answers true if the argument does not represent a valid float quantity.
Parameters:
  f - value to check for numberness.
public  longlongValue()
    
public static  floatparseFloat(String string)
     Answers the float which matches the passed in string.
public  shortshortValue()
    
public static  StringtoHexString(float f)
    

Converts a float into a hexadecimal string representation.


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

Returns a Float instance for the float value passed.


Field Detail
MAX_VALUE
final public static float MAX_VALUE(Code)

Constant for the maximum float value, (2 - 2-23) * 2127.




MIN_VALUE
final public static float MIN_VALUE(Code)

Constant for the minimum float value, 2-149.




NEGATIVE_INFINITY
final public static float NEGATIVE_INFINITY(Code)

Constant for the Negative Infinity value of the float type.




NaN
final public static float NaN(Code)

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




POSITIVE_INFINITY
final public static float POSITIVE_INFINITY(Code)

Constant for the Positive Infinity value of the float type.




SIZE
final public static int SIZE(Code)

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


since:
   1.5



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




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



Float
public Float(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.



Float
public Float(String string) throws NumberFormatException(Code)
Constructs a new instance of this class given a string.
Parameters:
  string - a string representation of a float quantity.
exception:
  NumberFormatException - if the argument could not be parsed as a float 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(float float1, float float2)(Code)
Compares the two floats. NaN is equal to NaN, and is greater than other float values. 0f is greater than -0f.
Parameters:
  float1 - the first value to compare
Parameters:
  float2 - the second value to compare Returns greater than zero when float1 is greater than float2,zero when float1 equals float2, and less than zero when float1 isless than float2
since:
   1.4



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



doubleValue
public double doubleValue()(Code)
Answers the double value which the receiver represents double the value of the receiver.



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 Floats, the check verifies that the receiver's value's bit pattern matches the bit pattern of the argument, which must also be a Float.
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:   Float.hashCode



floatToIntBits
native public static int floatToIntBits(float value)(Code)
Answers the binary representation of the argument, as an int.
Parameters:
  value - The float value to convert the bits of the float.



floatToRawIntBits
native public static int floatToRawIntBits(float value)(Code)
Answers the binary representation of the argument, as an int.
Parameters:
  value - The float value to convert the bits of the float.



floatValue
public float floatValue()(Code)
Answers the receiver's value as a float. the receiver's value



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:   Float.equals



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



intValue
public int intValue()(Code)
Answers the int value which the receiver represents int the value of the receiver.



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(float f)(Code)
Answers true if the argument represents an infinite quantity, and false otherwise.
Parameters:
  f - 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(float f)(Code)
Answers true if the argument does not represent a valid float quantity.
Parameters:
  f - value to check for numberness. true if the argument is Not A Numberfalse if it is a (potentially infinite) floatnumber



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



parseFloat
public static float parseFloat(String string) throws NumberFormatException(Code)
Answers the float which matches the passed in string. NumberFormatException is thrown if the string does not represent a valid float.
Parameters:
  string - the value to convert a float which would print as the argument
See Also:   Float.valueOf(String)
since:
   1.2



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



toHexString
public static String toHexString(float f)(Code)

Converts a float into a hexadecimal string representation.


Parameters:
  f - The float 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(float f)(Code)
Answers a string containing a printable representation of the argument.
Parameters:
  f - the float to print a printable representation of the argument.



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



valueOf
public static Float valueOf(float f)(Code)

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


Parameters:
  f - The float value. A Float 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.