Uint16ArrayBuilder Class
A TypedArrayBuilder for producing a Uint16Array.
Extends
- TypedArrayBuilder<Uint16Array>
Methods
Name | Description | |
---|---|---|
constructor(options?: TypedArrayBuilderOptions): Uint16ArrayBuilder | See TypedArrayBuilder constructor. |
Inherited methods
Name | Inherited from | Description |
---|---|---|
append(values: Uint16Array): void | TypedArrayBuilder<Uint16Array> | Append an array of values, resizing (at most once) if necessary. |
at(index: number): number | TypedArrayBuilder<Uint16Array> | Like TypedArray.at, |
ensureCapacity(newCapacity: number): number | TypedArrayBuilder<Uint16Array> | Ensure that TypedArrayBuilder.capacity is at least equal to newCapacity . |
push(value: number): void | TypedArrayBuilder<Uint16Array> | Append the specified value, resizing if necessary. |
toTypedArray(includeUnusedCapacity: boolean = false): Uint16Array | TypedArrayBuilder<Uint16Array> | Obtain the finished array. |
Inherited properties
Name | Type | Inherited from | Description |
---|---|---|---|
_constructor Protected | Constructor<Uint16Array> | TypedArrayBuilder<Uint16Array> | The constructor for the specific type of array being populated. |
_data Protected | Uint16Array | TypedArrayBuilder<Uint16Array> | The underlying typed array, to be reallocated and copied when its capacity is exceeded. |
_length Protected | number | TypedArrayBuilder<Uint16Array> | The number of elements added to the array so far. |
capacity Accessor ReadOnly | number | TypedArrayBuilder<Uint16Array> | The number of elements that can fit into the memory currently allocated for the array. |
growthFactor Readonly | number | TypedArrayBuilder<Uint16Array> | Multiplier applied to required capacity by TypedArrayBuilder.ensureCapacity. |
length Accessor ReadOnly | number | TypedArrayBuilder<Uint16Array> | The number of elements currently in the array. |
Defined in
Last Updated: 30 November, 2023