import { URI } from '../../base/common/uri'; export declare function getOrSet(map: Map, key: K, value: V): V; export declare function mapToString(map: Map): string; export declare function setToString(set: Set): string; export interface IKeyIterator { reset(key: K): this; next(): this; hasNext(): boolean; cmp(a: string): number; value(): string; } export declare class StringIterator implements IKeyIterator { private _value; private _pos; reset(key: string): this; next(): this; hasNext(): boolean; cmp(a: string): number; value(): string; } export declare class ConfigKeysIterator implements IKeyIterator { private readonly _caseSensitive; private _value; private _from; private _to; constructor(_caseSensitive?: boolean); reset(key: string): this; hasNext(): boolean; next(): this; cmp(a: string): number; value(): string; } export declare class PathIterator implements IKeyIterator { private readonly _splitOnBackslash; private readonly _caseSensitive; private _value; private _valueLen; private _from; private _to; constructor(_splitOnBackslash?: boolean, _caseSensitive?: boolean); reset(key: string): this; hasNext(): boolean; next(): this; cmp(a: string): number; value(): string; } export declare class UriIterator implements IKeyIterator { private readonly _ignorePathCasing; private _pathIterator; private _value; private _states; private _stateIdx; constructor(_ignorePathCasing: (uri: URI) => boolean); reset(key: URI): this; next(): this; hasNext(): boolean; cmp(a: string): number; value(): string; } export declare class TernarySearchTree { static forUris(ignorePathCasing?: (key: URI) => boolean): TernarySearchTree; static forPaths(): TernarySearchTree; static forStrings(): TernarySearchTree; static forConfigKeys(): TernarySearchTree; private _iter; private _root; constructor(segments: IKeyIterator); clear(): void; /** * Fill the tree with the same value of the given keys */ fill(element: V, keys: readonly K[]): void; /** * Fill the tree with given [key,value]-tuples */ fill(values: readonly [K, V][]): void; set(key: K, element: V): V | undefined; get(key: K): V | undefined; private _getNode; has(key: K): boolean; delete(key: K): void; deleteSuperstr(key: K): void; private _delete; private _min; findSubstr(key: K): V | undefined; findSuperstr(key: K): IterableIterator<[K, V]> | undefined; forEach(callback: (value: V, index: K) => any): void; [Symbol.iterator](): IterableIterator<[K, V]>; private _entries; _isBalanced(): boolean; } interface ResourceMapKeyFn { (resource: URI): string; } export declare class ResourceMap implements Map { private static readonly defaultToKey; readonly [Symbol.toStringTag] = "ResourceMap"; private readonly map; private readonly toKey; /** * * @param toKey Custom uri identity function, e.g use an existing `IExtUri#getComparison`-util */ constructor(toKey?: ResourceMapKeyFn); /** * * @param other Another resource which this maps is created from * @param toKey Custom uri identity function, e.g use an existing `IExtUri#getComparison`-util */ constructor(other?: ResourceMap, toKey?: ResourceMapKeyFn); set(resource: URI, value: T): this; get(resource: URI): T | undefined; has(resource: URI): boolean; get size(): number; clear(): void; delete(resource: URI): boolean; forEach(clb: (value: T, key: URI, map: Map) => void, thisArg?: any): void; values(): IterableIterator; keys(): IterableIterator; entries(): IterableIterator<[URI, T]>; [Symbol.iterator](): IterableIterator<[URI, T]>; } export declare const enum Touch { None = 0, AsOld = 1, AsNew = 2 } export declare class LinkedMap implements Map { readonly [Symbol.toStringTag] = "LinkedMap"; private _map; private _head; private _tail; private _size; private _state; constructor(); clear(): void; isEmpty(): boolean; get size(): number; get first(): V | undefined; get last(): V | undefined; has(key: K): boolean; get(key: K, touch?: Touch): V | undefined; set(key: K, value: V, touch?: Touch): this; delete(key: K): boolean; remove(key: K): V | undefined; shift(): V | undefined; forEach(callbackfn: (value: V, key: K, map: LinkedMap) => void, thisArg?: any): void; keys(): IterableIterator; values(): IterableIterator; entries(): IterableIterator<[K, V]>; [Symbol.iterator](): IterableIterator<[K, V]>; protected trimOld(newSize: number): void; private addItemFirst; private addItemLast; private removeItem; private touch; toJSON(): [K, V][]; fromJSON(data: [K, V][]): void; } export declare class LRUCache extends LinkedMap { private _limit; private _ratio; constructor(limit: number, ratio?: number); get limit(): number; set limit(limit: number); get ratio(): number; set ratio(ratio: number); get(key: K, touch?: Touch): V | undefined; peek(key: K): V | undefined; set(key: K, value: V): this; private checkTrim; } /** * Wraps the map in type that only implements readonly properties. Useful * in the extension host to prevent the consumer from making any mutations. */ export declare class ReadonlyMapView implements ReadonlyMap { #private; get size(): number; constructor(source: ReadonlyMap); forEach(callbackfn: (value: V, key: K, map: ReadonlyMap) => void, thisArg?: any): void; get(key: K): V | undefined; has(key: K): boolean; entries(): IterableIterator<[K, V]>; keys(): IterableIterator; values(): IterableIterator; [Symbol.iterator](): IterableIterator<[K, V]>; } export {}; //# sourceMappingURL=map.d.ts.map