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 Dictionary implements IDictionary { private keys; private values; constructor(); add(key: K, value: V): boolean; upsert(key: K, value: V): void; /** * Update the dictionary if the entry exists, else add it at the right place such that it is in the sorted order based on the key * @param key Key for the dictionary entry * @param value Value for the dictionary entry */ sortedUpsert(key: K, value: V): void; clear(): void; containsKey(key: K): boolean; containsValue(value: V): boolean; count(): number; getValue(key: K): V | boolean; getKeys(): K[]; getValues(): V[]; remove(key: K): boolean; update(key: K, value: V): boolean; }