typescript-dotnet-core
Version:
A the core classes and utilities of a JavaScript-Friendly .NET Based TypeScript Library.
31 lines (30 loc) • 1.37 kB
TypeScript
/*!
* @author electricessence / https://github.com/electricessence/
* Original: http://linqjs.codeplex.com/
* Licensing: MIT https://github.com/electricessence/TypeScript.NET-Core/blob/master/LICENSE.md
*/
import KeyValuePair from "../../KeyValuePair";
import { FiniteIEnumerator } from "../Enumeration/IEnumerator";
import { ILinkedNode } from "../ILinkedListNode";
import { HashSelector } from "../../FunctionTypes";
import DictionaryBase from "./DictionaryBase";
export interface IHashEntry<TKey, TValue> extends ILinkedNode<IHashEntry<TKey, TValue>>, KeyValuePair<TKey, TValue> {
}
export declare class Dictionary<TKey, TValue> extends DictionaryBase<TKey, TValue> {
private readonly _keyGenerator?;
private readonly _entries;
private readonly _buckets;
constructor(_keyGenerator?: HashSelector<TKey> | undefined);
protected _onDispose(): void;
protected getCount(): number;
private _getBucket;
private _getBucketEntry;
protected _getEntry(key: TKey): IHashEntry<TKey, TValue> | undefined;
getValue(key: TKey): TValue | undefined;
protected _setValueInternal(key: TKey, value: TValue | undefined): boolean;
protected _clearInternal(): number;
getEnumerator(): FiniteIEnumerator<KeyValuePair<TKey, TValue>>;
protected getKeys(): TKey[];
protected getValues(): TValue[];
}
export default Dictionary;