/*! * @author electricessence / https://github.com/electricessence/ * Licensing: MIT https://github.com/electricessence/TypeScript.NET/blob/master/LICENSE.md */ import { CollectionBase } from "../CollectionBase"; import { IKeyValuePair, KeyValuePair } from "../../KeyValuePair"; import { IDictionary } from "./IDictionary"; import { IEnumerator } from "../Enumeration/IEnumerator"; import { IEnumerableOrArray } from "../IEnumerableOrArray"; import { Action } from "../../FunctionTypes"; export declare abstract class DictionaryBase extends CollectionBase> implements IDictionary { protected constructor(source?: IEnumerableOrArray>); protected _onValueModified(key: TKey, value: TValue | undefined, old: TValue | undefined): void; protected _addInternal(item: KeyValuePair): boolean; protected _clearInternal(): number; contains(item: KeyValuePair): boolean; protected _removeInternal(item: IKeyValuePair | [TKey, TValue]): number; protected abstract getKeys(): TKey[]; readonly keys: TKey[]; protected abstract getValues(): TValue[]; readonly values: TValue[]; addByKeyValue(key: TKey, value: TValue): boolean; protected abstract _getEntry(key: TKey): IKeyValuePair | null; abstract getValue(key: TKey): TValue | undefined; getAssuredValue(key: TKey): TValue; tryGetValue(key: TKey, out: Action): boolean; protected abstract _setValueInternal(key: TKey, value: TValue | undefined): boolean; /** * Sets the value of an entry. * It's important to know that 'undefined' cannot exist as a value in the dictionary and is used as a flag for removal. * @param key * @param value * @returns {boolean} */ setValue(key: TKey, value: TValue | undefined): boolean; containsKey(key: TKey): boolean; containsValue(value: TValue): boolean; removeByKey(key: TKey): boolean; removeByValue(value: TValue): number; importEntries(pairs: IEnumerableOrArray> | IEnumerator> | null | undefined): number; protected _importEntries(pairs: IEnumerableOrArray> | IEnumerator> | null | undefined): number; getEnumerator(): IEnumerator>; } export default DictionaryBase;