OrderedId64Array Class

A SortedArray of unique Id64Strings sorted in ascending order by the 64-bit unsigned integer values of the Ids.

see OrderedId64Array.CompressedId64Set for an immutable compact string representation.

Extends

Implements

Methods

Name Description
constructor(): OrderedId64Array Construct a new, empty array.  

Inherited methods

Name Inherited from Description
Symbol.iterator(): Iterator<Id64String> ReadonlySortedArray.Symbol Returns an iterator over the contents of the array in sorted order, suitable for use in for-of loops.
_clear(): void Protected ReadonlySortedArray<T> Clears the contents of the sorted array.
_extractArray(): Id64String[] Protected ReadonlySortedArray<T> Extracts the sorted array as a T[] and empties the contents of this ReadonlySortedArray.
_insert(value: Id64String, onInsert?: (value: Id64String) => any): number Protected ReadonlySortedArray<T> Attempts to insert a new value into the array at a position determined by the ordering.
_remove(value: Id64String): number Protected ReadonlySortedArray<T> Removes the first occurrence of a value comparing equal to the specified value from the array.
clear(): void SortedArray<Id64String> Clears the contents of the sorted array.
contains(value: Id64String): boolean ReadonlySortedArray<T> Returns true if this array contains at least one value comparing equal to the specified value.
extractArray(): Id64String[] SortedArray<Id64String> Extracts the sorted array as a T[] and empties the contents of this SortedArray.
findEqual(value: Id64String): Id64String | undefined ReadonlySortedArray<T> Looks up an element comparing equal to the specified value using binary search.
findEquivalent(criterion: (element: Id64String) => number): Id64String | undefined ReadonlySortedArray<T> Find an element that compares as equivalent based on some criterion.
forEach(func: (value: Id64String) => void): void ReadonlySortedArray<T> Apply a function to each element in the array, in sorted order.
get(index: number): Id64String | undefined ReadonlySortedArray<T> Looks up an element by its index in the array.
indexOf(value: Id64String): number ReadonlySortedArray<T> Looks up the index of an element comparing equal to the specified value using binary search.
indexOfEquivalent(criterion: (element: Id64String) => number): number ReadonlySortedArray<T> Find the index of an element that compares as equivalent based on some criterion.
insert(value: Id64String, onInsert?: (value: Id64String) => any): number SortedArray<Id64String> Attempts to insert a new value into the array at a position determined by the ordering.
lowerBound(value: Id64String): { equal: boolean, index: number } Protected ReadonlySortedArray<T> Computes the position at which the specified value should be inserted to maintain sorted order.
remove(value: Id64String): number SortedArray<Id64String> Removes the first occurrence of a value comparing equal to the specified value from the array.

Properties

Name Type Description
ids Accessor ReadOnly OrderedId64Iterable An iterable that iterates over the Ids in sorted order.  

Inherited properties

Name Type Inherited from Description
_array Protected Id64String[] ReadonlySortedArray<T>  
_clone Protected shallowClone<Id64String> ReadonlySortedArray<T>  
_compare Protected OrderedComparator<Id64String> ReadonlySortedArray<T>  
_duplicatePolicy Protected DuplicatePolicy ReadonlySortedArray<T>  
isEmpty Accessor ReadOnly boolean ReadonlySortedArray<T> Returns true if the array contains no elements.
length Accessor ReadOnly number ReadonlySortedArray<T> The number of elements in the array

Defined in

Last Updated: 31 March, 2021