91 lines
2.9 KiB
TypeScript
91 lines
2.9 KiB
TypeScript
import { BidirectionalIterator } from "../iterators/Bidirectional";
|
|
|
|
export class SequenceContainer<T> {
|
|
move(rhs: SequenceContainer<T>): this;
|
|
size(): number;
|
|
begin(): BidirectionalIterator<T>;
|
|
end(): BidirectionalIterator<T>;
|
|
|
|
clone(): this;
|
|
copy(rhs: SequenceContainer<T>): this;
|
|
empty(): boolean;
|
|
/**
|
|
* @returns direct access to front item's value
|
|
*/
|
|
get front(): T;
|
|
set front(value: T);
|
|
/**
|
|
* @returns direct access to back item's value
|
|
*/
|
|
get back(): T;
|
|
set back(value: T);
|
|
/**
|
|
* inserts [begin, end) at dest
|
|
* @param dest where to insert
|
|
* @param begin of another SequenceContainer<T>
|
|
* @param end of another SequenceContainer<T>
|
|
* @returns iterator right after end iterator
|
|
*/
|
|
insert(dest: BidirectionalIterator<T>, begin: BidirectionalIterator<T>, end: BidirectionalIterator<T>): BidirectionalIterator<T>;
|
|
/**
|
|
* inserts [begin, end) at dest
|
|
* @param dest where to insert
|
|
* @param value which will be inserted
|
|
* @param n count of how many values will be inserted
|
|
* @returns iterator right after last inserted value
|
|
*/
|
|
insert(dest: BidirectionalIterator<T>, value: T, n: number): BidirectionalIterator<T>;
|
|
/**
|
|
* inserts [begin, end) at dest
|
|
* @param dest where to insert
|
|
* @param value which will be inserted
|
|
* @returns iterator right after inserted value
|
|
*/
|
|
insert(dest: BidirectionalIterator<T>, value: T): BidirectionalIterator<T>;
|
|
/**
|
|
* same as list.clear(); list.insert(list.begin(), ...)
|
|
* @param begin of another SequenceContainer<T>
|
|
* @param end of another SequenceContainer<T>
|
|
* @returns end iterator
|
|
*/
|
|
assign(begin: BidirectionalIterator<T>, end: BidirectionalIterator<T>): BidirectionalIterator<T>;
|
|
/**
|
|
* same as list.clear(); list.insert(list.begin(), ...)
|
|
* @param value which will be inserted
|
|
* @param n count of how many values will be inserted
|
|
* @returns iterator right after last inserted value
|
|
*/
|
|
assign(value: T, n: number): BidirectionalIterator<T>;
|
|
/**
|
|
* same as list.clear(); list.insert(list.begin(), ...)
|
|
* @param value which will be inserted
|
|
* @returns iterator right after inserted value
|
|
*/
|
|
assign(value: T): BidirectionalIterator<T>;
|
|
/**
|
|
* erases [begin, end)
|
|
* @param begin of erased range
|
|
* @param end of erased range
|
|
* @returns iterator right after erased range
|
|
*/
|
|
erase(begin: BidirectionalIterator<T>, end: BidirectionalIterator<T>): BidirectionalIterator<T>;
|
|
/**
|
|
* erases single item
|
|
* @param begin which points to erased item
|
|
* @returns iterator right after erased value
|
|
*/
|
|
erase(begin: BidirectionalIterator<T>): BidirectionalIterator<T>;
|
|
/**
|
|
* same as list.erase(list.begin(), list.end())
|
|
* @returns end iterator
|
|
*/
|
|
clear(): BidirectionalIterator<T>;
|
|
pushFront(value: T): void;
|
|
pushBack(value: T): void;
|
|
popFront(): void;
|
|
popBack(): void;
|
|
[Symbol.iterator](): Iterator<T>;
|
|
toJSON(): string;
|
|
toString(): string;
|
|
}
|