Long (Java Platform SE 7 ) (original) (raw)
Modifier and Type
Method and Description
static int
**[bitCount](../../java/lang/Long.html#bitCount%28long%29)**(long i)
Returns the number of one-bits in the two's complement binary representation of the specified long value.
byte
**[byteValue](../../java/lang/Long.html#byteValue%28%29)**()
Returns the value of this Long as abyte.
static int
**[compare](../../java/lang/Long.html#compare%28long,%20long%29)**(long x, long y)
Compares two long values numerically.
int
**[compareTo](../../java/lang/Long.html#compareTo%28java.lang.Long%29)**([Long](../../java/lang/Long.html "class in java.lang") anotherLong)
Compares two Long objects numerically.
static [Long](../../java/lang/Long.html "class in java.lang")
**[decode](../../java/lang/Long.html#decode%28java.lang.String%29)**([String](../../java/lang/String.html "class in java.lang") nm)
Decodes a String into a Long.
double
**[doubleValue](../../java/lang/Long.html#doubleValue%28%29)**()
Returns the value of this Long as adouble.
boolean
**[equals](../../java/lang/Long.html#equals%28java.lang.Object%29)**([Object](../../java/lang/Object.html "class in java.lang") obj)
Compares this object to the specified object.
float
**[floatValue](../../java/lang/Long.html#floatValue%28%29)**()
Returns the value of this Long as afloat.
static [Long](../../java/lang/Long.html "class in java.lang")
**[getLong](../../java/lang/Long.html#getLong%28java.lang.String%29)**([String](../../java/lang/String.html "class in java.lang") nm)
Determines the long value of the system property with the specified name.
static [Long](../../java/lang/Long.html "class in java.lang")
**[getLong](../../java/lang/Long.html#getLong%28java.lang.String,%20long%29)**([String](../../java/lang/String.html "class in java.lang") nm, long val)
Determines the long value of the system property with the specified name.
static [Long](../../java/lang/Long.html "class in java.lang")
**[getLong](../../java/lang/Long.html#getLong%28java.lang.String,%20java.lang.Long%29)**([String](../../java/lang/String.html "class in java.lang") nm,[Long](../../java/lang/Long.html "class in java.lang") val)
Returns the long value of the system property with the specified name.
int
**[hashCode](../../java/lang/Long.html#hashCode%28%29)**()
Returns a hash code for this Long.
static long
**[highestOneBit](../../java/lang/Long.html#highestOneBit%28long%29)**(long i)
Returns a long value with at most a single one-bit, in the position of the highest-order ("leftmost") one-bit in the specifiedlong value.
int
**[intValue](../../java/lang/Long.html#intValue%28%29)**()
Returns the value of this Long as anint.
long
**[longValue](../../java/lang/Long.html#longValue%28%29)**()
Returns the value of this Long as along value.
static long
**[lowestOneBit](../../java/lang/Long.html#lowestOneBit%28long%29)**(long i)
Returns a long value with at most a single one-bit, in the position of the lowest-order ("rightmost") one-bit in the specifiedlong value.
static int
**[numberOfLeadingZeros](../../java/lang/Long.html#numberOfLeadingZeros%28long%29)**(long i)
Returns the number of zero bits preceding the highest-order ("leftmost") one-bit in the two's complement binary representation of the specified long value.
static int
**[numberOfTrailingZeros](../../java/lang/Long.html#numberOfTrailingZeros%28long%29)**(long i)
Returns the number of zero bits following the lowest-order ("rightmost") one-bit in the two's complement binary representation of the specifiedlong value.
static long
**[parseLong](../../java/lang/Long.html#parseLong%28java.lang.String%29)**([String](../../java/lang/String.html "class in java.lang") s)
Parses the string argument as a signed decimal long.
static long
**[parseLong](../../java/lang/Long.html#parseLong%28java.lang.String,%20int%29)**([String](../../java/lang/String.html "class in java.lang") s, int radix)
Parses the string argument as a signed long in the radix specified by the second argument.
static long
**[reverse](../../java/lang/Long.html#reverse%28long%29)**(long i)
Returns the value obtained by reversing the order of the bits in the two's complement binary representation of the specified long value.
static long
**[reverseBytes](../../java/lang/Long.html#reverseBytes%28long%29)**(long i)
Returns the value obtained by reversing the order of the bytes in the two's complement representation of the specified long value.
static long
**[rotateLeft](../../java/lang/Long.html#rotateLeft%28long,%20int%29)**(long i, int distance)
Returns the value obtained by rotating the two's complement binary representation of the specified long value left by the specified number of bits.
static long
**[rotateRight](../../java/lang/Long.html#rotateRight%28long,%20int%29)**(long i, int distance)
Returns the value obtained by rotating the two's complement binary representation of the specified long value right by the specified number of bits.
short
**[shortValue](../../java/lang/Long.html#shortValue%28%29)**()
Returns the value of this Long as ashort.
static int
**[signum](../../java/lang/Long.html#signum%28long%29)**(long i)
Returns the signum function of the specified long value.
static [String](../../java/lang/String.html "class in java.lang")
**[toBinaryString](../../java/lang/Long.html#toBinaryString%28long%29)**(long i)
Returns a string representation of the long argument as an unsigned integer in base 2.
static [String](../../java/lang/String.html "class in java.lang")
**[toHexString](../../java/lang/Long.html#toHexString%28long%29)**(long i)
Returns a string representation of the long argument as an unsigned integer in base 16.
static [String](../../java/lang/String.html "class in java.lang")
**[toOctalString](../../java/lang/Long.html#toOctalString%28long%29)**(long i)
Returns a string representation of the long argument as an unsigned integer in base 8.
[String](../../java/lang/String.html "class in java.lang")
**[toString](../../java/lang/Long.html#toString%28%29)**()
Returns a String object representing thisLong's value.
static [String](../../java/lang/String.html "class in java.lang")
**[toString](../../java/lang/Long.html#toString%28long%29)**(long i)
Returns a String object representing the specifiedlong.
static [String](../../java/lang/String.html "class in java.lang")
**[toString](../../java/lang/Long.html#toString%28long,%20int%29)**(long i, int radix)
Returns a string representation of the first argument in the radix specified by the second argument.
static [Long](../../java/lang/Long.html "class in java.lang")
**[valueOf](../../java/lang/Long.html#valueOf%28long%29)**(long l)
Returns a Long instance representing the specifiedlong value.
static [Long](../../java/lang/Long.html "class in java.lang")
**[valueOf](../../java/lang/Long.html#valueOf%28java.lang.String%29)**([String](../../java/lang/String.html "class in java.lang") s)
Returns a Long object holding the value of the specified String.
static [Long](../../java/lang/Long.html "class in java.lang")
**[valueOf](../../java/lang/Long.html#valueOf%28java.lang.String,%20int%29)**([String](../../java/lang/String.html "class in java.lang") s, int radix)
Returns a Long object holding the value extracted from the specified String when parsed with the radix given by the second argument.