Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Arrays

Hierarchy

  • Arrays

Index

Methods

Static asList

  • asList<T>(...args: T[]): T[]

Static binarySearch

  • binarySearch(ar: Int32Array, el: number, comparator?: (a: number, b: number) => number): number
  • Parameters

    • ar: Int32Array
    • el: number
    • Optional comparator: (a: number, b: number) => number
        • (a: number, b: number): number
        • Parameters

          • a: number
          • b: number

          Returns number

    Returns number

Static copyOf

  • copyOf(original: Int32Array, newLength: number): Int32Array

Static copyOfRange

  • copyOfRange(original: Int32Array, from: number, to: number): Int32Array

Static copyOfUint8Array

  • copyOfUint8Array(original: Uint8Array, newLength: number): Uint8Array

Static create

  • create<T>(rows: int, cols: int, value?: T): T[][]

Static createInt32Array

  • createInt32Array(rows: int, cols: int, value?: int): Int32Array[]

Static equals

  • equals(first: any, second: any): boolean

Static fill

  • fill(a: Int32Array | Uint8Array | any[], val: int): void
  • Assigns the specified int value to each element of the specified array of ints.

    Parameters

    • a: Int32Array | Uint8Array | any[]

      the array to be filled

    • val: int

      the value to be stored in all elements of the array

    Returns void

Static fillUint8Array

  • fillUint8Array(a: Uint8Array, value: number): void

Static fillWithin

  • fillWithin(a: Int32Array, fromIndex: int, toIndex: int, val: int): void
  • Assigns the specified int value to each element of the specified range of the specified array of ints. The range to be filled extends from index {@code fromIndex}, inclusive, to index {@code toIndex}, exclusive. (If {@code fromIndex==toIndex}, the range to be filled is empty.)

    throws

    IllegalArgumentException if {@code fromIndex > toIndex}

    throws

    ArrayIndexOutOfBoundsException if {@code fromIndex < 0} or {@code toIndex > a.length}

    Parameters

    • a: Int32Array

      the array to be filled

    • fromIndex: int

      the index of the first element (inclusive) to be filled with the specified value

    • toIndex: int

      the index of the last element (exclusive) to be filled with the specified value

    • val: int

      the value to be stored in all elements of the array

    Returns void

Static hashCode

  • hashCode(a: any): number

Static numberComparator

  • numberComparator(a: number, b: number): number

Static rangeCheck

  • rangeCheck(arrayLength: int, fromIndex: int, toIndex: int): void
  • Checks that {@code fromIndex} and {@code toIndex} are in the range and throws an exception if they aren't.

    Parameters

    • arrayLength: int
    • fromIndex: int
    • toIndex: int

    Returns void

Generated using TypeDoc