constructor Method

Construct a new SortedArray.

SortedArray<T>(compare: OrderedComparator<T>, duplicatePolicy: boolean | DuplicatePolicyfalse, clone: CloneFunction<T>shallowClone): SortedArray<T>

Parameter Type Description
compare OrderedComparator<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

Last Updated: 23 November, 2024