/*! * @author electricessence / https://github.com/electricessence/ * Licensing: MIT https://github.com/electricessence/TypeScript.NET-Core/blob/master/LICENSE.md */ import CollectionBase from "../CollectionBase"; import KeyValuePair, { KeyValuePairOrTuple } from "../../KeyValuePair"; import IDictionary from "./IDictionary"; import { FiniteIEnumerator, IEnumerator } from "../Enumeration/IEnumerator"; import { Action } from "../../FunctionTypes"; import FiniteEnumerableOrArrayLike from "../FiniteEnumerableOrArrayLike"; import FiniteEnumerableOrEnumerator from "../Enumeration/FiniteEnumerableOrEnumerator"; export declare abstract class DictionaryBase extends CollectionBase> implements IDictionary { protected constructor(source?: FiniteEnumerableOrArrayLike>); protected _onValueModified(key: TKey, value: TValue | undefined, old: TValue | undefined): void; protected _addInternal(item: KeyValuePairOrTuple): boolean; protected _clearInternal(): number; contains(item: KeyValuePairOrTuple): boolean; protected _removeInternal(item: KeyValuePair | [TKey, TValue]): number; protected abstract getKeys(): TKey[]; get keys(): TKey[]; protected abstract getValues(): TValue[]; get values(): TValue[]; addByKeyValue(key: TKey, value: TValue): boolean; protected abstract _getEntry(key: TKey): KeyValuePair | undefined; 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: FiniteEnumerableOrArrayLike> | IEnumerator> | null | undefined): number; protected _importEntries(pairs: FiniteEnumerableOrEnumerator> | null | undefined): number; getEnumerator(): FiniteIEnumerator>; } export default DictionaryBase;