Float class wraps a value of primitive type float in an object.
More...
#include <java_lang_Float.h>
Inheritance diagram for java::lang::Float:


Public Types | |
| enum | { xmogDefaultFlags = xmog_base::GLOBAL, xmogMajorVersion = 3, xmogMinorVersion = 2, xmogPatchVersion = 9, xmogBuildNumber = 2047 } |
|
typedef ::xmog_java_array_template< ::java::lang::Float > | array1D |
|
typedef ::xmog_java_array_template< ::xmog_java_array_template< ::java::lang::Float > > | array2D |
Public Member Functions | |
| jbyte | byteValue (::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
Returns the value of this Float as a byte (by casting to a byte). | |
| jint | compareTo (const ::java::lang::Float &anotherFloat,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
Compares two Float objects numerically. | |
| jint | compareTo (const ::java::lang::Object &o,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
Compares this Float object to another object. | |
| jdouble | doubleValue (::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
Returns the double value of this Float object. | |
| bool | equals (const ::java::lang::Object &obj,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
| Compares this object against the specified object. | |
| Float (const ::java::lang::String &s,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) | |
Constructs a newly allocated Float object that represents the floating-point value of type float represented by the string. | |
| Float (jdouble value,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) | |
Constructs a newly allocated Float object that represents the argument converted to type float. | |
| Float (jfloat value,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) | |
Constructs a newly allocated Float object that represents the primitive float argument. | |
| jfloat | floatValue (::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
Returns the float value of this Float object. | |
| jint | hashCode (::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
Returns a hash code for this Float object. | |
| jint | intValue (::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
Returns the value of this Float as an int (by casting to type int). | |
| bool | isInfinite (::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
Returns true if this Float value is infinitely large in magnitude, false otherwise. | |
| bool | isNaN (::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
Returns true if this Float value is a Not-a-Number (NaN), false otherwise. | |
| jlong | longValue (::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
Returns value of this Float as a long (by casting to type long). | |
| jshort | shortValue (::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
Returns the value of this Float as a short (by casting to a short). | |
| ::java::lang::String | toString (::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
Returns a string representation of this Float object. | |
Static Public Member Functions | |
| static jint | compare (jfloat f1, jfloat f2,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
Compares the two specified float values. | |
| static jint | floatToIntBits (jfloat value,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
| Returns a representation of the specified floating-point value according to the IEEE 754 floating-point "single format" bit layout. | |
| static jint | floatToRawIntBits (jfloat value,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
| Returns a representation of the specified floating-point value according to the IEEE 754 floating-point "single format" bit layout, preserving Not-a-Number (NaN) values. | |
| static jfloat | intBitsToFloat (jint bits,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
Returns the float value corresponding to a given bit represention. | |
| static bool | isInfinite (jfloat v,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
Returns true if the specified number is infinitely large in magnitude, false otherwise. | |
| static bool | isNaN (jfloat v,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
Returns true if the specified number is a Not-a-Number (NaN) value, false otherwise. | |
| static jfloat | parseFloat (const ::java::lang::String &s,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
Returns a new float initialized to the value represented by the specified String, as performed by the valueOf method of class Float. | |
| ::java::lang::String | toString (jfloat f,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
Returns a string representation of the float argument. | |
| ::java::lang::Float | valueOf (const ::java::lang::String &s,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
Returns a Float object holding the float value represented by the argument string s. | |
Static Public Attributes | |
| static xmog_float | MAX_VALUE |
A constant holding the largest positive finite value of type float, (2-2-23)2127. | |
| static xmog_float | MIN_VALUE |
A constant holding the smallest positive nonzero value of type float, 2-149. | |
| static xmog_float | NaN |
A constant holding a Not-a-Number (NaN) value of type float. | |
| static xmog_float | NEGATIVE_INFINITY |
A constant holding the negative infinity of type float. | |
| static xmog_float | POSITIVE_INFINITY |
A constant holding the positive infinity of type float. | |
| ::java::lang::Class | TYPE |
The Class instance representing the primitive type float. | |
Float class wraps a value of primitive type float in an object.
An object of type Float contains a single field whose type is float.
In addition, this class provides several methods for converting a float to a String and a String to a float, as well as other constants and methods useful when dealing with a float.
Arthur van Hoff
|
||||||||||||||||
|
Constructs a newly allocated
|
|
||||||||||||||||
|
Constructs a newly allocated
|
|
||||||||||||||||
|
Constructs a newly allocated
The string is converted to a
|
|
||||||||||||
|
Returns the value of this
Reimplemented from java::lang::Number. |
|
||||||||||||||||||||
|
Compares the two specified The sign of the integer value returned is the same as that of the integer that would be returned by the call:
|
|
||||||||||||||||
|
Compares two
There are two ways in which comparisons performed by this method differ from those performed by the Java language numerical comparison operators (
Float.compareTo(Object) (which forwards its behavior to this method) obeys the general contract for Comparable.compareTo, and that the natural order on Floats is consistent with equals.
|
|
||||||||||||||||
|
Compares this
If the object is a
Reimplemented from java::lang::Comparable. |
|
||||||||||||
|
Returns the
Reimplemented from java::lang::Number. |
|
||||||||||||||||
|
Compares this object against the specified object.
The result is
Note that in most cases, for two instances of class
f1.floatValue() == f2.floatValue() </blockquote>
also has the value
Reimplemented from java::lang::Object. |
|
||||||||||||||||
|
||||||||||||||||
|
Returns a representation of the specified floating-point value according to the IEEE 754 floating-point "single format" bit layout, preserving Not-a-Number (NaN) values.
Bit 31 (the bit that is selected by the mask
If the argument is positive infinity, the result is
If the argument is negative infinity, the result is
If the argument is NaN, the result is the integer representing the actual NaN value. Unlike the
In all cases, the result is an integer that, when given to the method, will produce a floating-point value the same as the argument to
|
|
||||||||||||
|
Returns the
Reimplemented from java::lang::Number. |
|
||||||||||||
|
Returns a hash code for this
The result is the integer bit representation, exactly as produced by the method , of the primitive
Reimplemented from java::lang::Object. |
|
||||||||||||||||
|
Returns the The argument is considered to be a representation of a floating-point value according to the IEEE 754 floating-point "single format" bit layout.
If the argument is
If the argument is
If the argument is any value in the range In all other cases, let s, e, and m be three values that can be computed from the argument: <blockquote>
int s = ((bits >> 31) == 0) ? 1 : -1; int e = ((bits >> 23) & 0xff); int m = (e == 0) ? (bits & 0x7fffff) << 1 : (bits & 0x7fffff) | 0x800000; </blockquote> Then the floating-point result equals the value of the mathematical expression sm2e-150.
Note that this method may not be able to return a
|
|
||||||||||||
|
Returns the value of this
Reimplemented from java::lang::Number. |
|
||||||||||||||||
|
Returns
|
|
||||||||||||
|
Returns
|
|
||||||||||||||||
|
Returns
|
|
||||||||||||
|
Returns
|
|
||||||||||||
|
Returns value of this
Reimplemented from java::lang::Number. |
|
||||||||||||||||
|
Returns a new
|
|
||||||||||||
|
Returns the value of this
Reimplemented from java::lang::Number. |
|
||||||||||||||||
|
Returns a string representation of the All characters mentioned below are ASCII characters.
float. That is, suppose that x is the exact mathematical value represented by the decimal representation produced by this method for a finite nonzero argument f. Then f must be the float value nearest to x; or, if two float values are equally close to x, then f must be one of them and the least significant bit of the significand of f must be 0. To create localized string representations of a floating-point value, use subclasses of .
|
|
||||||||||||
|
Returns a string representation of this
The primitive
Reimplemented from java::lang::Object. |
|
||||||||||||||||
|
Returns a
If
Leading and trailing whitespace characters in To interpret localized string representations of a floating-point value, use subclasses of .
Note that trailing format specifiers, specifiers that determine the type of a floating-point literal (
|
|
|
A constant holding the largest positive finite value of type
It is equal to the value returned by |
|
|
A constant holding the smallest positive nonzero value of type
It is equal to the value returned by |
|
|
A constant holding a Not-a-Number (NaN) value of type
It is equivalent to the value returned by |
|
|
A constant holding the negative infinity of type
It is equal to the value returned by |
|
|
A constant holding the positive infinity of type
It is equal to the value returned by |
1.4.1