| java.lang.Object | ||
| ↳ | java.lang.Number | |
| ↳ | java.lang.Float | |
| Constants | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| float | MAX_VALUE |
Constant for the maximum |
|||||||||
| float | MIN_VALUE |
Constant for the minimum |
|||||||||
| float | NEGATIVE_INFINITY |
Constant for the Negative Infinity value of the |
|||||||||
| float | NaN |
Constant for the Not-a-Number (NaN) value of the |
|||||||||
| float | POSITIVE_INFINITY |
Constant for the Positive Infinity value of the |
|||||||||
| int | SIZE |
Constant for the number of bits to represent a |
|||||||||
| Class<Float> | TYPE | The java.lang.Class that represents this class. | |||||||||
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Constructs a new instance of the receiver which represents the float
valued argument.
| |||||||||||
Constructs a new instance of the receiver which represents the double
valued argument.
| |||||||||||
Constructs a new instance of this class given a string.
| |||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Returns the byte value which the receiver represents
| |||||||||||
Compares the two floats.
| |||||||||||
Compares the receiver with the Float parameter.
| |||||||||||
Returns the double value which the receiver represents
| |||||||||||
Compares the argument to the receiver, and returns true if they represent
the same object using a class specific comparison.
| |||||||||||
Returns the binary representation of the argument, as an int.
| |||||||||||
Returns the binary representation of the argument, as an int.
| |||||||||||
Returns the receiver's value as a float.
| |||||||||||
Returns an integer hash code for the receiver.
| |||||||||||
Returns a float built from the binary representation given in the
argument.
| |||||||||||
Returns the int value which the receiver represents
| |||||||||||
Returns true if the argument represents an infinite quantity, and false
otherwise.
| |||||||||||
Returns true if the receiver represents an infinite quantity, and false
otherwise.
| |||||||||||
Returns true if the argument does not represent a valid float quantity.
| |||||||||||
Returns true if the receiver does not represent a valid float quantity.
| |||||||||||
Returns the long value which the receiver represents
| |||||||||||
Returns the float which matches the passed in string.
| |||||||||||
Returns the short value which the receiver represents
| |||||||||||
Converts a | |||||||||||
Returns a string containing a printable representation of the argument.
| |||||||||||
Returns a string containing a concise, human-readable description of the
receiver.
| |||||||||||
Returns a | |||||||||||
Returns the float which matches the passed in string.
| |||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class java.lang.Number
| |||||||||||
From class java.lang.Object
| |||||||||||
From interface java.lang.Comparable
| |||||||||||
Constant for the maximum float value, (2 - 2-23) *
2127.
Constant for the minimum float value, 2-149.
Constant for the Negative Infinity value of the float
type.
Constant for the Not-a-Number (NaN) value of the float
type.
Constant for the Positive Infinity value of the float
type.
Constant for the number of bits to represent a float in
two's compliment form.
Constructs a new instance of the receiver which represents the float valued argument.
| value | the float to store in the new instance. |
|---|
Constructs a new instance of the receiver which represents the double valued argument.
| value | the double to store in the new instance. |
|---|
Constructs a new instance of this class given a string.
| string | a string representation of a float quantity. |
|---|
| NumberFormatException | if the argument could not be parsed as a float quantity. |
|---|
Returns the byte value which the receiver represents
Compares the two floats. NaN is equal to NaN, and is greater than other float values. 0f is greater than -0f.
| float1 | the first value to compare |
|---|---|
| float2 | the second value to compare |
Compares the receiver with the Float parameter. NaN is equal to NaN, and is greater than other float values. 0f is greater than -0f.
| object | the Float to compare to the receiver |
|---|
| NullPointerException | if object is null. |
|---|
Returns the double value which the receiver represents
Compares the argument to the receiver, and returns 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.
| object | the object to compare with this object |
|---|
true if the object is the same as this object
false if it is different from this objectReturns the binary representation of the argument, as an int.
| value | The float value to convert |
|---|
Returns the binary representation of the argument, as an int.
| value | The float value to convert |
|---|
Returns the receiver's value as a float.
Returns 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.
Returns a float built from the binary representation given in the argument.
| bits | the bits of the float |
|---|
Returns the int value which the receiver represents
Returns true if the argument represents an infinite quantity, and false otherwise.
| f | value to check for infinitness. |
|---|
true if the argument is positive or negative
infinity false if it is not an infinite value
Returns true if the receiver represents an infinite quantity, and false otherwise.
true if the argument is positive or negative
infinity false if it is not an infinite value
Returns true if the argument does not represent a valid float quantity.
| f | value to check for numberness. |
|---|
true if the argument is Not A Number
false if it is a (potentially infinite) float
number
Returns true if the receiver does not represent a valid float quantity.
true if the argument is Not A Number
false if it is a (potentially infinite) float
number
Returns the long value which the receiver represents
Returns the float which matches the passed in string. NumberFormatException is thrown if the string does not represent a valid float.
| string | the value to convert |
|---|
| NumberFormatException |
|---|
Returns the short value which the receiver represents
Converts a float into a hexadecimal string representation.
| f | The float to convert. |
|---|
f.Returns a string containing a printable representation of the argument.
| f | the float to print |
|---|
Returns a string containing a concise, human-readable description of the receiver.
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.
| f | The float value. |
|---|
Float instance.Returns the float which matches the passed in string. NumberFormatException is thrown if the string does not represent a valid float.
| string | the value to convert |
|---|
| NumberFormatException |
|---|