Skip to main content
Module

x/neo4j_lite_client/mod.ts>Integer

Unofficial Neo4j Driver for Deno
Latest
class Integer
Re-export
import { Integer } from "https://deno.land/x/neo4j_lite_client@4.4.6/mod.ts";

Constructs a 64 bit two's-complement integer, given its low and high 32 bit values as signed integers. See exported functions for more convenient ways of operating integers. Use int() function to create new integers, isInt() to check if given object is integer, inSafeRange() to check if it is safe to convert given value to native number, toNumber() and toString() to convert given integer to number or string respectively.

Constructors

new
Integer(low?: number, high?: number)

Properties

high: number
low: number

Methods

add(addend: Integerable): Integer

Returns the sum of this and the specified Integer.

and(other: Integerable): Integer

Returns the bitwise AND of this Integer and the specified.

compare(other: Integerable): number

Compares this Integer's value with the specified's.

div(divisor: Integerable): Integer

Returns this Integer divided by the specified.

equals(other: Integerable): boolean

Tests if this Integer's value equals the specified's.

getHighBits(): number

Gets the high 32 bits as a signed integer.

getLowBits(): number

Gets the low 32 bits as a signed integer.

getNumBitsAbs(): number

Gets the number of bits needed to represent the absolute value of this Integer.

greaterThan(other: Integerable): boolean

Tests if this Integer's value is greater than the specified's.

greaterThanOrEqual(other: Integerable): boolean

Tests if this Integer's value is greater than or equal the specified's.

inSafeRange(): boolean
isEven(): boolean

Tests if this Integer's value is even.

isNegative(): boolean

Tests if this Integer's value is negative.

isOdd(): boolean

Tests if this Integer's value is odd.

isPositive(): boolean

Tests if this Integer's value is positive.

isZero(): boolean

Tests if this Integer's value equals zero.

lessThan(other: Integerable): boolean

Tests if this Integer's value is less than the specified's.

lessThanOrEqual(other: Integerable): boolean

Tests if this Integer's value is less than or equal the specified's.

modulo(divisor: Integerable): Integer

Returns this Integer modulo the specified.

multiply(multiplier: Integerable): Integer

Returns the product of this and the specified Integer.

Negates this Integer's value.

Returns the bitwise NOT of this Integer.

notEquals(other: Integerable): boolean

Tests if this Integer's value differs from the specified's.

or(other: Integerable): Integer

Returns the bitwise OR of this Integer and the specified.

shiftLeft(numBits: number | Integer): Integer

Returns this Integer with bits shifted to the left by the given amount.

shiftRight(numBits: number | Integer): Integer

Returns this Integer with bits arithmetically shifted to the right by the given amount.

subtract(subtrahend: Integerable): Integer

Returns the difference of this and the specified Integer.

toBigInt(): bigint

Converts the Integer to a BigInt representation of this value

toInt(): number

Converts the Integer to an exact javascript Number, assuming it is a 32 bit integer.

toNumber(): number

Converts the Integer to a the nearest floating-point representation of this value (double, 53 bit mantissa).

Converts the Integer to native number or -Infinity/+Infinity when it does not fit.

toString(radix?: number): string

Converts the Integer to a string written in the specified radix.

xor(other: Integerable): Integer

Returns the bitwise XOR of this Integer and the given one.

Static Properties

__isInteger__: boolean

An indicator used to reliably determine if an object is a Integer or not.

MAX_SAFE_VALUE: Integer

Maximum safe value.

MAX_VALUE: Integer

Maximum signed value.

MIN_SAFE_VALUE: Integer

Minimum safe value.

MIN_VALUE: Integer

Minimum signed value.

NEG_ONE: Integer

Signed negative one.

ONE: Integer

Signed one.

ZERO: Integer

Signed zero.

Static Methods

fromBits(lowBits: number, highBits: number): Integer

Returns a Integer representing the 64 bit integer that comes by concatenating the given low and high bits. Each is assumed to use 32 bits.

fromInt(value: number): Integer

Returns a Integer representing the given 32 bit integer value.

fromNumber(value: number): Integer

Returns a Integer representing the given value, provided that it is a finite number. Otherwise, zero is returned.

fromString(str: string, radix?: number): Integer

Returns a Integer representation of the given string, written using the specified radix.

fromValue(val: Integerable): Integer

Converts the specified value to a Integer.

inSafeRange(val: Integerable): boolean

Checks if the given value is in the safe range in order to be converted to a native number

isInteger(obj: any): obj is Integer

Tests if the specified object is a Integer.

toNumber(val: Integerable): number

Converts the specified value to a number.

toString(val: Integerable, radix?: number): string

Converts the specified value to a string.