/*! * Copyright (c) Microsoft Corporation and contributors. All rights reserved. * Licensed under the MIT License. */ /** * @internal */ export declare abstract class SortedSet { /** * Standard comparator semantics: * - If a \< b, return a negative number * - If a \> b, return a positive number * - If a and b are equivalent, return 0 */ protected abstract compare(a: T, b: T): number; protected readonly sortedItems: T[]; get size(): number; get items(): readonly T[]; addOrUpdate(newItem: T, update?: (existingItem: T, newItem: T) => void): void; remove(item: T): boolean; has(item: T): boolean; protected findItemPosition(item: T): { exists: boolean; index: number; }; /** * Invoked when `findItemPosition` finds an equivalent item (i.e. `compare` returns 0 between that item and the search item). * * By default, `SortedSet` assumes that equivalent items are equal and returns the found index. * @param item - The item that is being searched for (argument to `findItemPosition`) * @param index - The index of the equivalent item in the sorted set */ protected onFindEquivalent(item: T, index: number): { exists: boolean; index: number; }; } //# sourceMappingURL=sortedSet.d.ts.map