//================================================================ /** * @packageDocumentation * @module std.base */ //================================================================ import { MapContainer } from "./MapContainer"; import { ITreeContainer } from "../../internal/container/associative/ITreeContainer"; import { IPair } from "../../utility/IPair"; import { Entry } from "../../utility/Entry"; /** * Common interface for tree maps. * * @template Key Key type * @template T Mapped type * @template Unique Whether duplicated key is blocked or not * @template Source Derived type extending this {@link ITreeMap} * @template IteratorT Iterator type * @template ReverseT Reverse iterator type * * @author Jeongho Nam - https://github.com/samchon */ export interface ITreeMap< Key, T, Unique extends boolean, Source extends ITreeMap, IteratorT extends ITreeMap.Iterator< Key, T, Unique, Source, IteratorT, ReverseT >, ReverseT extends ITreeMap.ReverseIterator< Key, T, Unique, Source, IteratorT, ReverseT >, > extends MapContainer, ITreeContainer< Key, Entry, Source, IteratorT, ReverseT, IPair > {} export namespace ITreeMap { /** * Iterator of {@link ITreeMap} * * @author Jenogho Nam */ export type Iterator< Key, T, Unique extends boolean, Source extends ITreeMap, IteratorT extends Iterator, ReverseT extends ReverseIterator< Key, T, Unique, Source, IteratorT, ReverseT >, > = MapContainer.Iterator; /** * Reverse iterator of {@link ITreeMap} * * @author Jenogho Nam */ export type ReverseIterator< Key, T, Unique extends boolean, Source extends ITreeMap, IteratorT extends Iterator, ReverseT extends ReverseIterator< Key, T, Unique, Source, IteratorT, ReverseT >, > = MapContainer.ReverseIterator< Key, T, Unique, Source, IteratorT, ReverseT >; }