Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Long

Hierarchy

  • Long

Index

Constructors

constructor

  • new Long(low: number, high: number): Long

Properties

Static MAX_VALUE

MAX_VALUE: Long

Static MIN_VALUE

MIN_VALUE: Long

Static NEG_ONE

NEG_ONE: Long

Static ONE

ONE: Long

Static ZERO

ZERO: Long

Methods

add

and

compare

  • compare(other: Long): number

div

equals

  • equals(other: Long): boolean

getHighBits

  • getHighBits(): number

getLowBits

  • getLowBits(): number

getLowBitsUnsigned

  • getLowBitsUnsigned(): number

getNumBitsAbs

  • getNumBitsAbs(): number

greaterThan

  • greaterThan(other: Long): number

greaterThanOrEqual

  • greaterThanOrEqual(other: Long): number
  • Return whether this Long is greater than or equal to the other.

    Parameters

    • other: Long

      Long to compare against.

    Returns number

isNegative

  • isNegative(): boolean

isOdd

  • isOdd(): boolean

isZero

  • isZero(): boolean

lessThan

  • lessThan(other: Long): boolean

lessThanOrEqual

  • lessThanOrEqual(other: Long): boolean

modulo

multiply

negate

not

notEquals

  • notEquals(other: Long): boolean

or

shiftLeft

  • shiftLeft(other: number): Long
  • Returns this Long with bits shifted to the left by the given amount.

    Parameters

    • other: number

      The number of bits by which to shift.

    Returns Long

shiftRight

  • shiftRight(other: number): Long
  • Returns this Long with bits shifted to the right by the given amount.

    Parameters

    • other: number

      The number of bits by which to shift.

    Returns Long

shiftRightUnsigned

  • shiftRightUnsigned(other: number): Long
  • Returns this Long with bits shifted to the right by the given amount, with the new top bits matching the current sign bit.

    Parameters

    • other: number

      The number of bits by which to shift.

    Returns Long

subtract

toInt

  • toInt(): number

toJSON

  • toJSON(): string

toNumber

  • toNumber(): number

toString

  • toString(opt_radix?: number): string
  • Return the String value.

    Parameters

    • Optional opt_radix: number

      The radix in which the text should be written.

    Returns string

xor

Static fromBits

  • fromBits(lowBits: number, highBits: number): Long
  • Returns a Long representing the 64-bit integer that comes by concatenating the given high and low bits. Each is assumed to use 32 bits.

    Parameters

    • lowBits: number

      The low 32-bits.

    • highBits: number

      The high 32-bits.

    Returns Long

Static fromInt

  • fromInt(value: number): Long
  • Returns a Long representing the given (32-bit) integer value.

    Parameters

    • value: number

      The 32-bit integer in question.

    Returns Long

Static fromNumber

  • fromNumber(value: number): Long
  • Returns a Long representing the given value, provided that it is a finite number. Otherwise, zero is returned.

    Parameters

    • value: number

      The number in question.

    Returns Long

Static fromString

  • fromString(str: string, radix?: number): Long
  • Returns a Long representation of the given string, written using the given radix.

    Parameters

    • str: string

      The textual representation of the Long.

    • Optional radix: number

      The radix in which the text is written.

    Returns Long

Generated using TypeDoc