/*!
 * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
 * Licensed under the MIT License.
 */
import { ISegment } from "./mergeTree";
/**
 * Stores a unique and sorted set of segments, or objects with segments
 *
 * This differs from a normal sorted set in that the keys are not fixed.
 * The segments are sorted via their ordinals which can change as the merge tree is modified.
 * Even though the values of the ordinals can change their ordering and uniqueness cannot, so the order of a set of
 * segments ordered by their ordinals will always have the same order even if the ordinal values on
 * the segments changes. This invariant allows ensure the segments stay ordered and unique, and that new segments
 * can be inserted into that order.
 */
export declare class SortedSegmentSet<T extends ISegment | {
    readonly segment: ISegment;
} = ISegment> {
    private readonly ordinalSortedItems;
    get size(): number;
    get items(): readonly T[];
    addOrUpdate(newItem: T, update?: (existingItem: T, newItem: T) => T): void;
    remove(item: T): boolean;
    has(item: T): boolean;
    private getOrdinal;
    private findOrdinalPosition;
}
//# sourceMappingURL=sortedSegmentSet.d.ts.map