import { IEnumerable } from './enumerable'; import { IEqualityComparer } from './equality-comparer'; import { IGrouping } from './grouping'; import { KeyValuePair } from './key-value-pair'; import { List } from './list'; export interface IDictionary extends IEnumerable> { Add(key: TKey, value: TValue): void; Clear(): void; Set(key: TKey, value: TValue): void; Get(key: TKey): TValue; ContainsKey(key: TKey): boolean; Remove(key: TKey): boolean; TryGetValue(key: TKey): [boolean, TValue]; } export declare class Dictionary implements IDictionary { private freeList; private freeCount; private version; private count; private buckets; private entries; private comparer; constructor(dictionary?: Iterable> | Iterable<[TKey, TValue]> | number, comparer?: IEqualityComparer); private Initialize; Add(key: TKey, value: TValue): void; Set(key: TKey, value: TValue): void; Get(key: TKey): TValue; ContainsKey(key: TKey): boolean; Clear(): void; Remove(key: TKey): boolean; TryGetValue(key: TKey): [boolean, TValue]; private FindEntry; private TryInsert; private Resize; [Symbol.iterator](): IterableIterator>; All(predicate: (item: KeyValuePair) => boolean): boolean; Any(predicate?: (item: KeyValuePair) => boolean): boolean; AsEnumerable(): IEnumerable>; Average(selector?: (item: KeyValuePair) => number): number | null; Concat(second: IEnumerable>): IEnumerable>; Contains(value: KeyValuePair, comparer?: IEqualityComparer>): boolean; Count(predicate?: (item: KeyValuePair) => boolean): number; DefaultIfEmpty(defaultValue?: IEnumerable>): IEnumerable>; Distinct(comparer?: IEqualityComparer>): IEnumerable>; ElementAt(index: number): KeyValuePair; ElementAtOrDefault(defaultValue: KeyValuePair, index: number): KeyValuePair; Except(second: IEnumerable>, comparer?: IEqualityComparer>): IEnumerable>; First(predicate?: (item: KeyValuePair) => boolean): KeyValuePair; FirstOrDefault(defaultValue: KeyValuePair, predicate?: (item: KeyValuePair) => boolean): KeyValuePair; GroupBy>(keySelector: (item: KeyValuePair) => TGroupKey, elementSelector?: (item: KeyValuePair) => TElement, comparer?: IEqualityComparer): IEnumerable>; GroupJoin; Inners: IEnumerable; }>(inner: IEnumerable, outerKeySelector: (item: KeyValuePair) => TGroupKey, innerKeySelector: (item: TInner) => TGroupKey, resultSelector?: (item: KeyValuePair, inners: IEnumerable) => TResult, comparer?: IEqualityComparer): IEnumerable; Intersect(second: IEnumerable>, comparer?: IEqualityComparer>): IEnumerable>; Join; Inner: TInner; }>(inner: IEnumerable, outerKeySelector: (item: KeyValuePair) => TGroupKey, innerKeySelector: (item: TInner) => TGroupKey, resultSelector?: (item: KeyValuePair, inners: TInner) => TResult, comparer?: IEqualityComparer): IEnumerable; Last(predicate?: (item: KeyValuePair) => boolean): KeyValuePair; LastOrDefault(defaultValue: KeyValuePair, predicate?: (item: KeyValuePair) => boolean): KeyValuePair; Max(selector?: (item: KeyValuePair) => number): number | null; Min(selector?: (item: KeyValuePair) => number): number | null; Reverse(): IEnumerable>; Select(selector: (item: KeyValuePair, index?: number) => TResult): IEnumerable; SelectMany(collectionSelector: (item: KeyValuePair, index?: number) => IEnumerable, resultSelector?: (item: KeyValuePair, collection: TCollection) => TResult): IEnumerable; SequenceEqual(second: Iterable>, comparer?: IEqualityComparer>): boolean; Single(predicate?: (item: KeyValuePair) => boolean): KeyValuePair; SingleOrDefault(defaultValue: KeyValuePair, predicate?: (item: KeyValuePair) => boolean): KeyValuePair; Skip(count: number): IEnumerable>; SkipWhile(predicate: (item: KeyValuePair, index?: number) => boolean): IEnumerable>; Sum(selector?: (item: KeyValuePair) => number): number | null; Take(count: number): IEnumerable>; TakeWhile(predicate: (item: KeyValuePair, index?: number) => boolean): IEnumerable>; ToArray(): Array>; ToDictionary>(keySelector: (item: KeyValuePair) => TDictionaryKey, elementSelector?: (item: KeyValuePair) => TElement, comparer?: IEqualityComparer): Dictionary; ToList(): List>; Union(second: Iterable>, comparer?: IEqualityComparer>): IEnumerable>; Where(predicate: (item: KeyValuePair, index?: number) => boolean): IEnumerable>; }