/** * @packageDocumentation * @module std.base */ import { ILinearContainer } from "./ILinearContainer"; import { IRandomAccessIterator } from "../../iterator/IRandomAccessIterator"; /** * Common interface for array containers. * * @template T Stored elements' type * @template SourceT Derived type extending this {@link IArrayContainer} * @template IteratorT Iterator type * @template ReverseT Reverse iterator type * @template PElem Parent type of *T*, used for inserting elements through {@link assign} and {@link insert}. * * @author Jeongho Nam - https://github.com/samchon */ export interface IArrayContainer, IteratorT extends IArrayContainer.Iterator, ReverseT extends IArrayContainer.ReverseIterator, PElem = T> extends ILinearContainer { /** * Get iterator at specific position. * * @param index Specific position. * @return The iterator at the *index*. */ nth(index: number): IteratorT; /** * Get element at specific position. * * @param index Specific position. * @return The element at the *index*. */ at(index: number): T; /** * Change element at specific position. * * @param index Specific position. * @param val The new value to change. */ set(index: number, val: T): void; } export declare namespace IArrayContainer { /** * Iterator of {@link IArrayContainer} * * @author Jenogho Nam */ type Iterator, IteratorT extends IArrayContainer.Iterator, ReverseT extends IArrayContainer.ReverseIterator, ElemT = T> = ILinearContainer.Iterator & IRandomAccessIterator; /** * Reverse iterator of {@link IArrayContainer} * * @author Jeongho Nam - https://github.com/samchon */ type ReverseIterator, IteratorT extends IArrayContainer.Iterator, ReverseT extends IArrayContainer.ReverseIterator, ElemT = T> = ILinearContainer.ReverseIterator & IRandomAccessIterator; } //# sourceMappingURL=IArrayContainer.d.ts.map