Android Guides | Samples

Java.Lang.Long Class

The wrapper for the primitive type long.

See Also: Long

Syntax

[Android.Runtime.Register("java/lang/Long", DoNotGenerateAcw=true)]
public sealed class Long : Number, IComparable, IConvertible, IDisposable

Remarks

The wrapper for the primitive type long.

Implementation note: The "bit twiddling" methods in this class use techniques described in and

See Also

[Android Documentation]

Requirements

Namespace: Java.Lang
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1

The members of Java.Lang.Long are listed below.

See Also: Number

Public Constructors

Constructs a new Long with the specified primitive long value.
Constructs a new Long from the specified string.

Public Fields

const
MaxValueInt64 (9223372036854775807). Constant for the maximum long value, 263-1.
const
MinValueInt64 (-9223372036854775808). Constant for the minimum long value, -263.
const
SizeInt32 (64). Constant for the number of bits needed to represent a long in two's complement form.

Public Properties

[read-only]
static
TypeClass. The Class object that represents the primitive type long.

Protected Properties

[read-only]
override
ThresholdClassIntPtr. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.
[read-only]
override
ThresholdTypeType. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

Public Methods

static
BitCount(Int64) : Int32
Counts the number of 1 bits in the specified long value; this is also referred to as population count.
static
Compare(Int64, Int64) : Int32
Compares two long values.
CompareTo(Long) : Int32
Compares this object to the specified long object to determine their relative order.
static
Decode(String) : Long
Parses the specified string and returns a Long instance if the string can be decoded into a long value.
override
DoubleValue() : Double
Returns this object's value as a double.
override
FloatValue() : Single
Returns this object's value as a float.
static
GetLong(String) : Long
Returns the Long value of the system property identified by string.
static
GetLong(String, Long) : Long
Returns the Long value of the system property identified by string.
static
GetLong(String, Int64) : Long
Returns the Long value of the system property identified by string.
static
HighestOneBit(Int64) : Int64
Determines the highest (leftmost) bit of the specified long value that is 1 and returns the bit mask value for that bit.
override
IntValue() : Int32
Returns this object's value as an int.
override
LongValue() : Int64
Gets the primitive value of this long.
static
LowestOneBit(Int64) : Int64
Determines the lowest (rightmost) bit of the specified long value that is 1 and returns the bit mask value for that bit.
static
NumberOfLeadingZeros(Int64) : Int32
Determines the number of leading zeros in the specified long value prior to the Long.HighestOneBit(Int64).
static
NumberOfTrailingZeros(Int64) : Int32
Determines the number of trailing zeros in the specified long value after the Long.LowestOneBit(Int64).
static
ParseLong(String) : Int64
Parses the specified string as a signed decimal long value.
static
ParseLong(String, Int32) : Int64
Parses the specified string as a signed long value using the specified radix.
static
Reverse(Int64) : Int64
Reverses the order of the bits of the specified long value.
static
ReverseBytes(Int64) : Int64
Reverses the order of the bytes of the specified long value.
static
RotateLeft(Int64, Int32) : Int64
Rotates the bits of the specified long value to the left by the specified number of bits.
static
RotateRight(Int64, Int32) : Int64
Rotates the bits of the specified long value to the right by the specified number of bits.
static
Signum(Int64) : Int32
Returns the value of the signum function for the specified long value.
static
ToBinaryString(Int64) : String
Converts the specified long value into its binary string representation.
static
ToHexString(Int64) : String
Converts the specified long value into its hexadecimal string representation.
static
ToOctalString(Int64) : String
Converts the specified long value into its octal string representation.
static
ToString(Int64) : String
Converts the specified long value into its decimal string representation.
static
ToString(Int64, Int32) : String
Converts the specified signed long value into a string representation based on the specified radix.
static
ValueOf(Int64) : Long
Returns a Long instance for the specified long value.
static
ValueOf(String) : Long
Parses the specified string as a signed decimal long value.
static
ValueOf(String, Int32) : Long
Parses the specified string as a signed long value using the specified radix.

Public Operators

Explicitly Implemented Interface Members