/** * @packageDocumentation * @module std */ import { IForwardContainer } from "../ranges/container/IForwardContainer"; import { IForwardIterator } from "../iterator/IForwardIterator"; import { IClear } from "../internal/container/partial/IClear"; import { IEmpty } from "../internal/container/partial/IEmpty"; import { ISize } from "../internal/container/partial/ISize"; import { IDeque } from "../internal/container/partial/IDeque"; import { IFront } from "../internal/container/partial/IFront"; import { IListAlgorithm } from "../internal/container/linear/IListAlgorithm"; import { Comparator } from "../internal/functional/Comparator"; import { BinaryPredicator } from "../internal/functional/BinaryPredicator"; import { UnaryPredicator } from "../internal/functional/UnaryPredicator"; /** * Singly Linked List. * * @author Jeongho Nam - https://github.com/samchon */ export declare class ForwardList implements IForwardContainer>, IClear, IEmpty, ISize, IDeque, IFront, Iterable, IListAlgorithm> { private ptr_; private size_; private before_begin_; private end_; /** * Default Constructor. */ constructor(); /** * Initializer Constructor. * * @param items Items to assign. */ constructor(items: T[]); /** * Copy Constructor * * @param obj Object to copy. */ constructor(obj: ForwardList); /** * Fill Constructor. * * @param size Initial size. * @param val Value to fill. */ constructor(n: number, val: T); /** * Range Constructor. * * @param first Input iterator of the first position. * @param last Input iterator of the last position. */ constructor(first: Readonly>, last: Readonly>); /** * Fill Assigner. * * @param n Initial size. * @param val Value to fill. */ assign(n: number, val: T): void; /** * Range Assigner. * * @param first Input iteartor of the first position. * @param last Input iterator of the last position. */ assign>>(first: InputIterator, last: InputIterator): void; /** * @inheritDoc */ clear(): void; /** * @inheritDoc */ size(): number; /** * @inheritDoc */ empty(): boolean; /** * @inheritDoc */ front(): T; /** * @inheritDoc */ front(val: T): void; /** * Iterator to before beginning. * * @return Iterator to the before beginning. */ before_begin(): ForwardList.Iterator; /** * @inheritDoc */ begin(): ForwardList.Iterator; /** * @inheritDoc */ end(): ForwardList.Iterator; /** * @inheritDoc */ [Symbol.iterator](): IterableIterator; /** * @inheritDoc */ push_front(val: T): void; /** * Insert an element. * * @param pos Position to insert after. * @param val Value to insert. * @return An iterator to the newly inserted element. */ insert_after(pos: ForwardList.Iterator, val: T): ForwardList.Iterator; /** * Inserted repeated elements. * * @param pos Position to insert after. * @param n Number of elements to insert. * @param val Value to insert repeatedly. * @return An iterator to the last of the newly inserted elements. */ insert_after(pos: ForwardList.Iterator, n: number, val: T): ForwardList.Iterator; /** * Insert range elements. * * @param pos Position to insert after. * @param first Input iterator of the first position. * @param last Input iteartor of the last position. * @return An iterator to the last of the newly inserted elements. */ insert_after>>(pos: ForwardList.Iterator, first: InputIterator, last: InputIterator): ForwardList.Iterator; private _Insert_by_repeating_val; private _Insert_by_range; /** * @inheritDoc */ pop_front(): void; /** * Erase an element. * * @param it Position to erase after. * @return Iterator to the erased element. */ erase_after(it: ForwardList.Iterator): ForwardList.Iterator; /** * Erase elements. * * @param first Range of the first position to erase after. * @param last Rangee of the last position to erase. * @return Iterator to the last removed element. */ erase_after(first: ForwardList.Iterator, last: ForwardList.Iterator): ForwardList.Iterator; /** * @inheritDoc */ unique(binary_pred?: BinaryPredicator): void; /** * @inheritDoc */ remove(val: T): void; /** * @inheritDoc */ remove_if(pred: UnaryPredicator): void; /** * @inheritDoc */ merge(from: ForwardList, comp?: Comparator): void; /** * Transfer elements. * * @param pos Position to insert after. * @param from Target container to transfer. */ splice_after(pos: ForwardList.Iterator, from: ForwardList): void; /** * Transfer a single element. * * @param pos Position to insert after. * @param from Target container to transfer. * @param before Previous position of the single element to transfer. */ splice_after(pos: ForwardList.Iterator, from: ForwardList, before: ForwardList.Iterator): void; /** * Transfer range elements. * * @param pos Position to insert after. * @param from Target container to transfer. * @param first Range of previous of the first position to transfer. * @param last Rangee of the last position to transfer. */ splice_after(pos: ForwardList.Iterator, from: ForwardList, first_before: ForwardList.Iterator, last: ForwardList.Iterator): void; /** * @inheritDoc */ sort(comp?: Comparator): void; /** * @inheritDoc */ reverse(): void; /** * @inheritDoc */ swap(obj: ForwardList): void; /** * Native function for `JSON.stringify()`. * * @return An array containing children elements. */ toJSON(): Array; } /** * */ export declare namespace ForwardList { /** * Iterator of {@link ForwardList} * * @author Jeongho Nam - https://github.com/samchon */ class Iterator implements IForwardIterator> { private source_ptr_; private next_; private value_; private constructor(); /** * Get source container. * * @return The source container. */ source(): ForwardList; /** * @inheritDoc */ get value(): T; /** * @inheritDoc */ set value(val: T); private _Try_value; /** * @inheritDoc */ next(): Iterator; /** * @inheritDoc */ equals(obj: Iterator): boolean; } } //# sourceMappingURL=ForwardList.d.ts.map