Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Integer

Represents an integer value in an Ion stream.

[1] http://amzn.github.io/ion-docs/docs/spec.html#int

Hierarchy

  • newClass<NumberConstructor, this> & Number
    • Integer

Implements

Index

Constructors

constructor

  • new Integer(value: JSBI | number, annotations?: string[]): Integer
  • Constructor.

    Parameters

    • value: JSBI | number

      The numeric value to represent as an integer.

    • Default value annotations: string[] = []

      An optional array of strings to associate with value.

    Returns Integer

Properties

_ionAnnotations

_ionAnnotations: string[]

_ionType

_ionType: IonType

Static Number

Number: NumberConstructor

An object that represents a number of any kind. All JavaScript numbers are 64-bit floating-point numbers.

Methods

_setAnnotations

  • _setAnnotations(annotations: string[]): void

_unsupportedOperation

  • _unsupportedOperation<T>(functionName: string): never

_valueEquals

  • _valueEquals(other: any, options?: { epsilon?: number | null; ignoreAnnotations?: undefined | false | true; ignoreTimestampPrecision?: undefined | false | true; onlyCompareIon?: undefined | false | true }): boolean
  • Parameters

    • other: any
    • Default value options: { epsilon?: number | null; ignoreAnnotations?: undefined | false | true; ignoreTimestampPrecision?: undefined | false | true; onlyCompareIon?: undefined | false | true } = {epsilon: null,ignoreAnnotations: false,ignoreTimestampPrecision: false,onlyCompareIon: true,}
      • Optional epsilon?: number | null
      • Optional ignoreAnnotations?: undefined | false | true
      • Optional ignoreTimestampPrecision?: undefined | false | true
      • Optional onlyCompareIon?: undefined | false | true

    Returns boolean

allFields

  • allFields(): [string, Value[]][]

as

bigIntValue

  • bigIntValue(): JSBI

booleanValue

  • booleanValue(): boolean | null

dateValue

  • dateValue(): Date | null

decimalValue

deleteField

  • deleteField(name: string): boolean

elements

equals

  • equals(other: any, options?: { epsilon?: number | null }): boolean
  • Implementation of the dom.Value interface method equals()

    Parameters

    • other: any
    • Default value options: { epsilon?: number | null } = { epsilon: null }
      • Optional epsilon?: number | null

    Returns boolean

fieldNames

  • fieldNames(): string[]

fields

  • fields(): [string, Value][]

get

getAll

getAnnotations

  • getAnnotations(): string[]

getType

ionEquals

  • ionEquals(other: Value, options?: { epsilon?: number | null; ignoreAnnotations?: undefined | false | true; ignoreTimestampPrecision?: undefined | false | true }): boolean
  • Implementation of the dom.Value interface method ionEquals()

    Parameters

    • other: Value
    • Default value options: { epsilon?: number | null; ignoreAnnotations?: undefined | false | true; ignoreTimestampPrecision?: undefined | false | true } = {epsilon: null,ignoreAnnotations: false,ignoreTimestampPrecision: false,}
      • Optional epsilon?: number | null
      • Optional ignoreAnnotations?: undefined | false | true
      • Optional ignoreTimestampPrecision?: undefined | false | true

    Returns boolean

isNull

  • isNull(): boolean

numberValue

  • numberValue(): number

stringValue

  • stringValue(): string | null

timestampValue

toExponential

  • toExponential(fractionDigits?: undefined | number): string
  • Returns a string containing a number represented in exponential notation.

    Parameters

    • Optional fractionDigits: undefined | number

      Number of digits after the decimal point. Must be in the range 0 - 20, inclusive.

    Returns string

toFixed

  • toFixed(fractionDigits?: undefined | number): string
  • Returns a string representing a number in fixed-point notation.

    Parameters

    • Optional fractionDigits: undefined | number

      Number of digits after the decimal point. Must be in the range 0 - 20, inclusive.

    Returns string

toLocaleString

  • toLocaleString(locales?: string | string[], options?: Intl.NumberFormatOptions): string
  • Converts a number to a string by using the current or specified locale.

    Parameters

    • Optional locales: string | string[]

      A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.

    • Optional options: Intl.NumberFormatOptions

      An object that contains one or more properties that specify comparison options.

    Returns string

toPrecision

  • toPrecision(precision?: undefined | number): string
  • Returns a string containing a number represented either in exponential or fixed-point notation with a specified number of digits.

    Parameters

    • Optional precision: undefined | number

      Number of significant digits. Must be in the range 1 - 21, inclusive.

    Returns string

toString

  • toString(): string

uInt8ArrayValue

  • uInt8ArrayValue(): Uint8Array | null

valueOf

  • valueOf(): number

writeTo

  • writeTo(writer: Writer): void

Static _fromJsValue

  • _fromJsValue(jsValue: any, annotations: string[]): Value

Static _getIonType