export interface IDictionary { add(key: K, value: V): boolean; upsert(key: K, value: V): void; clear(): void; containsKey(key: K): boolean; containsValue(value: V): boolean; count(): number; getKeys(): K[]; getValues(): V[]; getValue(key: K): V | boolean; update(key: K, value: V): boolean; remove(key: K): boolean; } export default class HashMap implements IDictionary { private data; add(key: string, value: V): boolean; upsert(key: string, value: V): void; clear(): void; containsKey(key: string): boolean; containsValue(value: V): boolean; count(): number; getValue(key: string): V | boolean; getKeys(): string[]; getValues(): V[]; remove(key: string): boolean; update(key: string, value: V): boolean; /** * Returns the internal object. * The current implementation returns data: { the actual key value pairs} as hashmap. * Wherever there is a need to pass only the key value pairs without data being appended along with it, return this.data. */ getInternalObject(): { [key: string]: V; }; }