/** * @packageDocumentation * @module std.base */ import { MapContainer } from "./MapContainer"; import { IForwardIterator } from "../../iterator/IForwardIterator"; import { IPair } from "../../utility/IPair"; /** * Basic map container allowing duplicated keys. * * @template Key Key type * @template T Mapped type * @template Source Derived type extending this {@link MultiMap} * @template IteratorT Iterator type * @template ReverseT Reverse iterator type * * @author Jeongho Nam - https://github.com/samchon */ export declare abstract class MultiMap, Iterator extends MultiMap.Iterator, Reverse extends MultiMap.ReverseIterator> extends MapContainer { /** * Construct and insert an element. * * @param key Key to be mapped. * @param value Value to emplace. * @return An iterator to the newly inserted element. */ abstract emplace(key: Key, value: T): Iterator; /** * Construct and insert element with hint. * * @param hint Hint for the position where the element can be inserted. * @param key Key of the new element. * @param val Value of the new element. * @return An iterator to the newly inserted element. */ abstract emplace_hint(hint: Iterator, key: Key, val: T): Iterator; /** * Insert an element. * * @param pair A tuple to be referenced for the insert. * @return An iterator to the newly inserted element. */ insert(pair: IPair): Iterator; /** * Insert an element with hint. * * @param hint Hint for the position where the element can be inserted. * @param pair A tuple to be referenced for the insert. * @return An iterator to the newly inserted element. */ insert(hint: Iterator, pair: IPair): Iterator; /** * Insert range elements. * * @param first Input iterator of the first position. * @param last Input iteartor of the last position. */ insert, InputIterator>>>(first: InputIterator, last: InputIterator): void; protected abstract _Key_eq(x: Key, y: Key): boolean; protected _Erase_by_key(key: Key): number; /** * @inheritDoc */ merge(source: Source): void; } /** * */ export declare namespace MultiMap { /** * Iterator of {@link MultiMap} * * @author Jenogho Nam */ type Iterator, IteratorT extends Iterator, ReverseT extends ReverseIterator> = MapContainer.Iterator; /** * Reverse iterator of {@link MultiMap} * * @author Jenogho Nam */ type ReverseIterator, IteratorT extends Iterator, ReverseT extends ReverseIterator> = MapContainer.ReverseIterator; } //# sourceMappingURL=MultiMap.d.ts.map