API Reference > bentleyjs-core > Collections > SortedArray > constructor constructor Method Construct a new SortedArray. SortedArray<T>(compare: OrderedComparator<T, T>, duplicatePolicy: boolean | DuplicatePolicy = false, clone: CloneFunction<T> = shallowClone): SortedArray<T> Parameter Type Description compare OrderedComparator<T, T> The function used to compare elements within the array. duplicatePolicy boolean | DuplicatePolicy Policy for handling attempts to insert a value when an equivalent value already exists. If the input is a boolean, then true indicates DuplicatePolicy.Allow, and false indicates DuplicatePolicy.Retain. clone CloneFunction<T> The function invoked to clone a new element for insertion into the array. The default implementation simply returns its input. Returns - SortedArray<T> Defined in core/bentley/src/SortedArray.ts Line 301 Last Updated: 12 June, 2024