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


Public Types | |
| enum | { xmogDefaultFlags = xmog_base::GLOBAL, xmogMajorVersion = 3, xmogMinorVersion = 2, xmogPatchVersion = 9, xmogBuildNumber = 2047 } |
|
typedef ::xmog_java_array_template< ::java::lang::Long > | array1D |
|
typedef ::xmog_java_array_template< ::xmog_java_array_template< ::java::lang::Long > > | array2D |
Public Member Functions | |
| jbyte | byteValue (::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
Returns the value of this Long as a byte. | |
| jint | compareTo (const ::java::lang::Long &anotherLong,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
Compares two Long objects numerically. | |
| jint | compareTo (const ::java::lang::Object &o,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
Compares this Long object to another object. | |
| jdouble | doubleValue (::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
Returns the value of this Long as a double. | |
| bool | equals (const ::java::lang::Object &obj,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
| Compares this object to the specified object. | |
| jfloat | floatValue (::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
Returns the value of this Long as a float. | |
| jint | hashCode (::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
Returns a hash code for this Long. | |
| jint | intValue (::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
Returns the value of this Long as an int. | |
| Long (const ::java::lang::String &s,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) | |
Constructs a newly allocated Long object that represents the long value indicated by the String parameter. | |
| Long (jlong value,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) | |
Constructs a newly allocated Long object that represents the specified long argument. | |
| jlong | longValue (::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
Returns the value of this Long as a long value. | |
| jshort | shortValue (::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
Returns the value of this Long as a short. | |
| ::java::lang::String | toString (::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
Returns a String object representing this Long's value. | |
Static Public Member Functions | |
| ::java::lang::Long | decode (const ::java::lang::String &nm,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
Decodes a String into a Long. | |
| ::java::lang::Long | getLong (const ::java::lang::String &nm, const ::java::lang::Long &val,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
Returns the long value of the system property with the specified name. | |
| ::java::lang::Long | getLong (const ::java::lang::String &nm, jlong val,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
Determines the long value of the system property with the specified name. | |
| ::java::lang::Long | getLong (const ::java::lang::String &nm,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
Determines the long value of the system property with the specified name. | |
| static jlong | parseLong (const ::java::lang::String &s, jint radix,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
Parses the string argument as a signed long in the radix specified by the second argument. | |
| static jlong | parseLong (const ::java::lang::String &s,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
Parses the string argument as a signed decimal long. | |
| ::java::lang::String | toBinaryString (jlong i,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
Returns a string representation of the long argument as an unsigned integer in base 2. | |
| ::java::lang::String | toHexString (jlong i,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
Returns a string representation of the long argument as an unsigned integer in base 16. | |
| ::java::lang::String | toOctalString (jlong i,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
Returns a string representation of the long argument as an unsigned integer in base 8. | |
| ::java::lang::String | toString (jlong i, jint radix,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
| Returns a string representation of the first argument in the radix specified by the second argument. | |
| ::java::lang::String | toString (jlong i,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
Returns a String object representing the specified long. | |
| ::java::lang::Long | valueOf (const ::java::lang::String &s, jint radix,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
Returns a Long object holding the value extracted from the specified String when parsed with the radix given by the second argument. | |
| ::java::lang::Long | valueOf (const ::java::lang::String &s,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags) |
Returns a Long object holding the value of the specified String. | |
Static Public Attributes | |
| static xmog_long | MAX_VALUE |
A constant holding the maximum value a long can have, 263-1. | |
| static xmog_long | MIN_VALUE |
A constant holding the minimum value a long can have, -263. | |
| ::java::lang::Class | TYPE |
The Class instance representing the primitive type long. | |
Long class wraps a value of the primitive type long in an object.
An object of type Long contains a single field whose type is long.
In addition, this class provides several methods for converting a long to a String and a String to a long, as well as other constants and methods useful when dealing with a long.
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 two
|
|
||||||||||||||||
|
Compares this
If the object is a
Reimplemented from java::lang::Comparable. |
|
||||||||||||||||
|
Accepts decimal, hexadecimal, and octal numbers given by the following grammar: <blockquote>
DecimalNumeral, HexDigits, and OctalDigits are defined in 3.10.1 of the Java Language Specification.
The sequence of characters following an (optional) negative sign and/or radix specifier ("
|
|
||||||||||||
|
Returns the value of this
Reimplemented from java::lang::Number. |
|
||||||||||||||||
|
Compares this object to the specified object.
The result is
Reimplemented from java::lang::Object. |
|
||||||||||||
|
Returns the value of this
Reimplemented from java::lang::Number. |
|
||||||||||||||||||||
|
Returns the
The first argument is treated as the name of a system property. System properties are accessible through the method. The string value of this property is then interpreted as a
Note that, in every case, neither
The second argument is the default value. The default value is returned if there is no property of the specified name, if the property does not have the correct numeric format, or if the specified name is empty or
|
|
||||||||||||||||||||
|
Determines the
The first argument is treated as the name of a system property. System properties are accessible through the method. The string value of this property is then interpreted as a
The second argument is the default value. A
In other words, this method returns a
</blockquote> to avoid the unnecessary allocation of a
|
|
||||||||||||||||
|
Determines the
The first argument is treated as the name of a system property. System properties are accessible through the method. The string value of this property is then interpreted as a
If there is no property with the specified name, if the specified name is empty or
In other words, this method returns a
|
|
||||||||||||
|
Returns a hash code for this
The result is the exclusive OR of the two halves of the primitive
(int)(this.longValue()^(this.longValue()>>>32)) </blockquote>
Reimplemented from java::lang::Object. |
|
||||||||||||
|
Returns the value of this
Reimplemented from java::lang::Number. |
|
||||||||||||
|
Returns the value of this
Reimplemented from java::lang::Number. |
|
||||||||||||||||||||
|
Parses the string argument as a signed
The characters in the string must all be digits of the specified radix (as determined by whether returns a nonnegative value), except that the first character may be an ASCII minus sign
Note that neither the character
An exception of type
Examples: <blockquote>
parseLong("0", 10) returns 0L parseLong("473", 10) returns 473L parseLong("-0", 10) returns 0L parseLong("-FF", 16) returns -255L parseLong("1100110", 2) returns 102L parseLong("99", 8) throws a NumberFormatException parseLong("Hazelnut", 10) throws a NumberFormatException parseLong("Hazelnut", 36) returns 1356099454469L </blockquote>
|
|
||||||||||||||||
|
Parses the string argument as a signed decimal
The characters in the string must all be decimal digits, except that the first character may be an ASCII minus sign
Note that neither the character
|
|
||||||||||||
|
Returns the value of this
Reimplemented from java::lang::Number. |
|
||||||||||||||||
|
Returns a string representation of the
The unsigned
|
|
||||||||||||||||
|
Returns a string representation of the
The unsigned
0123456789abcdef
</blockquote> These are the characters
Long.toHexString(n).toUpperCase() </blockquote>
|
|
||||||||||||||||
|
Returns a string representation of the
The unsigned
If the unsigned magnitude is zero, it is represented by a single zero character
01234567
</blockquote> These are the characters
|
|
||||||||||||||||||||
|
Returns a string representation of the first argument in the radix specified by the second argument.
If the radix is smaller than
If the first argument is negative, the first element of the result is the ASCII minus sign
The remaining characters of the result represent the magnitude of the first argument. If the magnitude is zero, it is represented by a single zero character
0123456789abcdefghijklmnopqrstuvwxyz
</blockquote> These are
Long.toString(n, 16).toUpperCase() </blockquote>
|
|
||||||||||||||||
|
Returns a The argument is converted to signed decimal representation and returned as a string, exactly as if the argument and the radix 10 were given as arguments to the method.
|
|
||||||||||||
|
Returns a
The value is converted to signed decimal representation and returned as a string, exactly as if the
Reimplemented from java::lang::Object. |
|
||||||||||||||||||||
|
Returns a
The first argument is interpreted as representing a signed
In other words, this method returns a
<blockquote>
|
|
||||||||||||||||
|
Returns a
The argument is interpreted as representing a signed decimal
In other words, this method returns a <blockquote>
</blockquote>
|
1.4.1