Package | |
Class | public class Long |
Inheritance | Long Object |
Property | Defined By | ||
---|---|---|---|
isNegative : Boolean
Checks if the long isNegative bit is set
| Long | ||
lower : uint
This returns the lower 32 bits of the long
| Long | ||
MAX_VALUE_JAVA : Long [static] [read-only] | Long | ||
NEGATIVE_ONE : Long [static] [read-only] | Long | ||
upper : uint
This returns the upper 32 bits of the long
| Long | ||
ZERO : Long [static] [read-only] | Long |
Method | Defined By | ||
---|---|---|---|
Long(upper:uint, lower:uint, isNegative:Boolean = false)
Construct a new Long type. | Long | ||
Adds the given int value to the long
| Long | ||
clearBit(value:uint):void
Clears the bit at a given location in the long
| Long | ||
Compares this instance to the passed in instance, equals zero if they are the same. | Long | ||
[static]
Creates a long from a number. | Long | ||
isBitSet(value:uint):Boolean
Checks if a bit at a given location within the Long is set
| Long | ||
isValueSame(value:Long):Boolean
Similar to compareTo only this returns a boolean if they match or not as opposed to returning the difference
| Long | ||
isZero():Boolean
Checks if this instance is equal to zero
| Long | ||
setBit(value:uint):void
Sets a bit at the given location in the long
| Long | ||
The bitwise shift left operation, creates a new Long. | Long | ||
shiftRight(value:uint):Long
The bitwise shift right operation is a unsigned right shift and creates a new Long with the value
| Long | ||
toNum():Number
Returns a number representation of the current long. | Long | ||
toString(value:uint = 16):String
Returns a string representation of this long, hexadecimal and decimal are the only supported radix types. | Long |
isNegative | property |
isNegative:Boolean
Checks if the long isNegative bit is set
Implementation
public function get isNegative():Boolean
public function set isNegative(value:Boolean):void
lower | property |
lower:uint
This returns the lower 32 bits of the long
Implementation
public function get lower():uint
public function set lower(value:uint):void
MAX_VALUE_JAVA | property |
NEGATIVE_ONE | property |
upper | property |
upper:uint
This returns the upper 32 bits of the long
Implementation
public function get upper():uint
public function set upper(value:uint):void
ZERO | property |
Long | () | Constructor |
public function Long(upper:uint, lower:uint, isNegative:Boolean = false)
Construct a new Long type.
Parametersupper:uint — a uint for the top 32 bits
| |
lower:uint — a uint for the lower 32 bits
| |
isNegative:Boolean (default = false ) — a boolean specifying if the number is negative
|
addInt | () | method |
public function addInt(value:int):Long
Adds the given int value to the long
Parameters
value:int — a int that needs to be added to the long
|
Long — long a new long created from adding the int and the long together
|
clearBit | () | method |
public function clearBit(value:uint):void
Clears the bit at a given location in the long
Parameters
value:uint — a uint specifying the location to clear the bit
|
compareTo | () | method |
public function compareTo(value:Long):int
Compares this instance to the passed in instance, equals zero if they are the same.
Parameters
value:Long — a long to compare this instance to.
|
int — int equal to 0 if they are the same
|
fromNum | () | method |
public static function fromNum(value:Number):Long
Creates a long from a number.
Parameters
value:Number — A number that will be converted to a Long
|
Long — Long the long representation of the given value
|
isBitSet | () | method |
public function isBitSet(value:uint):Boolean
Checks if a bit at a given location within the Long is set
Parameters
value:uint — a uint specifying the location to check if the bit is set
|
Boolean — true if the bit is set
|
isValueSame | () | method |
public function isValueSame(value:Long):Boolean
Similar to compareTo only this returns a boolean if they match or not as opposed to returning the difference
Parameters
value:Long — a long to compare against this instance
|
Boolean — true if they are equal values
|
isZero | () | method |
public function isZero():Boolean
Checks if this instance is equal to zero
ReturnsBoolean — true if this instance of long is equal to zero
|
setBit | () | method |
public function setBit(value:uint):void
Sets a bit at the given location in the long
Parameters
value:uint — a uint of the location of the bit to set
|
shiftLeft | () | method |
public function shiftLeft(value:uint):Long
The bitwise shift left operation, creates a new Long.
Parameters
value:uint — a uint to shift left by.
|
Long — Long a new long with the value after the shift
|
shiftRight | () | method |
public function shiftRight(value:uint):Long
The bitwise shift right operation is a unsigned right shift and creates a new Long with the value
Parameters
value:uint — a uint specifying the number to shift right by.
|
Long — Long a new long with the value after the shift
|
toNum | () | method |
public function toNum():Number
Returns a number representation of the current long. Note: A number is only precise to 53 bits so accuracy could be lost.
ReturnsNumber — A number representation of a long.
|
toString | () | method |
public function toString(value:uint = 16):String
Returns a string representation of this long, hexadecimal and decimal are the only supported radix types.
Parameters
value:uint (default = 16 ) — a uint specifying the radix to return, default is 16(hexadecimal) else 10(decimal).
|
String — string a string representation of the long
|