Double class wraps a value of the primitive type double in an object.
More...
#include <java_lang_Double.h>
Inheritance diagram for java::lang::Double:


Public Types | |
| enum | { xmogDefaultFlags = xmog_base::GLOBAL, xmogMajorVersion = 3, xmogMinorVersion = 2, xmogPatchVersion = 9, xmogBuildNumber = 2047 } |
|
typedef ::xmog_java_array_template< ::java::lang::Double > | array1D |
|
typedef ::xmog_java_array_template< ::xmog_java_array_template< ::java::lang::Double > > | array2D |
Public Member Functions | |
| jbyte | byteValue (::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
Returns the value of this Double as a byte (by casting to a byte). | |
| jint | compareTo (const ::java::lang::Double &anotherDouble,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
Compares two Double objects numerically. | |
| jint | compareTo (const ::java::lang::Object &o,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
Compares this Double object to another object. | |
| Double (const ::java::lang::String &s,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) | |
Constructs a newly allocated Double object that represents the floating-point value of type double represented by the string. | |
| Double (jdouble value,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) | |
Constructs a newly allocated Double object that represents the primitive double argument. | |
| jdouble | doubleValue (::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
Returns the double value of this Double 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. | |
| jfloat | floatValue (::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
Returns the float value of this Double object. | |
| jint | hashCode (::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
Returns a hash code for this Double object. | |
| jint | intValue (::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
Returns the value of this Double as an int (by casting to type int). | |
| bool | isInfinite (::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
Returns true if this Double value is infinitely large in magnitude, false otherwise. | |
| bool | isNaN (::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
Returns true if this Double value is a Not-a-Number (NaN), false otherwise. | |
| jlong | longValue (::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
Returns the value of this Double 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 Double 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 Double object. | |
Static Public Member Functions | |
| static jint | compare (jdouble d1, jdouble d2,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
Compares the two specified double values. | |
| static jlong | doubleToLongBits (jdouble 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 "double format" bit layout. | |
| static jlong | doubleToRawLongBits (jdouble 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 "double format" bit layout, preserving Not-a-Number (NaN) values. | |
| static bool | isInfinite (jdouble 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 (jdouble 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 jdouble | longBitsToDouble (jlong bits,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
Returns the double value corresponding to a given bit representation. | |
| static jdouble | parseDouble (const ::java::lang::String &s,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
Returns a new double initialized to the value represented by the specified String, as performed by the valueOf method of class Double. | |
| ::java::lang::String | toString (jdouble d,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
Returns a string representation of the double argument. | |
| ::java::lang::Double | valueOf (const ::java::lang::String &s,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
Returns a Double object holding the double value represented by the argument string s. | |
Static Public Attributes | |
| static xmog_double | MAX_VALUE |
A constant holding the largest positive finite value of type double, (2-2-52)21023. | |
| static xmog_double | MIN_VALUE |
A constant holding the smallest positive nonzero value of type double, 2-1074. | |
| static xmog_double | NaN |
A constant holding a Not-a-Number (NaN) value of type double. | |
| static xmog_double | NEGATIVE_INFINITY |
A constant holding the negative infinity of type double. | |
| static xmog_double | POSITIVE_INFINITY |
A constant holding the positive infinity of type double. | |
| ::java::lang::Class | TYPE |
The Class instance representing the primitive type double. | |
Double class wraps a value of the primitive type double in an object.
An object of type Double contains a single field whose type is double.
In addition, this class provides several methods for converting a double to a String and a String to a double, as well as other constants and methods useful when dealing with a double.
Arthur van Hoff
|
||||||||||||||||
|
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 (
Double.compareTo(Object) (which forwards its behavior to this method) obeys the general contract for Comparable.compareTo, and that the natural order on Doubles is consistent with equals.
|
|
||||||||||||||||
|
Compares this
If the object is a
Reimplemented from java::lang::Comparable. |
|
||||||||||||||||
|
||||||||||||||||
|
Returns a representation of the specified floating-point value according to the IEEE 754 floating-point "double format" bit layout, preserving Not-a-Number (NaN) values.
Bit 63 (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
In all cases, the result is a
|
|
||||||||||||
|
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
d1.doubleValue() == d2.doubleValue() </blockquote>
also has the value
Reimplemented from java::lang::Object. |
|
||||||||||||
|
Returns the
Reimplemented from java::lang::Number. |
|
||||||||||||
|
Returns a hash code for this
The result is the exclusive OR of the two halves of the
(int)(v^(v>>>32))
</blockquote> where
long v = Double.doubleToLongBits(this.doubleValue()); </blockquote>
Reimplemented from java::lang::Object. |
|
||||||||||||
|
Returns the value of this
Reimplemented from java::lang::Number. |
|
||||||||||||||||
|
Returns
|
|
||||||||||||
|
Returns
|
|
||||||||||||||||
|
Returns
|
|
||||||||||||
|
Returns
|
|
||||||||||||||||
|
Returns the The argument is considered to be a representation of a floating-point value according to the IEEE 754 floating-point "double 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 >> 63) == 0) ? 1 : -1; int e = (int)((bits >> 52) & 0x7ffL); long m = (e == 0) ? (bits & 0xfffffffffffffL) << 1 : (bits & 0xfffffffffffffL) | 0x10000000000000L; </blockquote> Then the floating-point result equals the value of the mathematical expression sm2e-1075.
Note that this method may not be able to return a
|
|
||||||||||||
|
Returns the 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.
double. That is, suppose that x is the exact mathematical value represented by the decimal representation produced by this method for a finite nonzero argument d. Then d must be the double value nearest to x; or if two double values are equally close to x, then d must be one of them and the least significant bit of the significand of d 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