Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface IContainer<T, SourceT, IteratorT, ReverseT, PElem>

Common interface for containers.

author

Jeongho Nam - https://github.com/samchon

Type parameters

  • T: PElem

    Stored elements' type

  • SourceT: IContainer<T, SourceT, IteratorT, ReverseT, PElem>

    Derived type extending this IContainer

  • IteratorT: Iterator<T, SourceT, IteratorT, ReverseT, PElem>

    Iterator type

  • ReverseT: ReverseIterator<T, SourceT, IteratorT, ReverseT, PElem>

    Reverse iterator type

  • PElem = T

    Parent type of T, used for inserting elements through assign and insert.

Hierarchy

Implemented by

Index

Type aliases

IteratorType

IteratorType<Container>: Container extends Array<infer T> ? Vector.Iterator<T> : Container extends IBidirectionalContainer<infer Iterator, any> ? Iterator : unknown

Deduct iterator type.

Type parameters

ReverseIteratorType

ReverseIteratorType<Container>: Container extends Array<infer T> ? Vector.ReverseIterator<T> : Container extends IBidirectionalContainer<any, infer ReverseIterator> ? ReverseIterator : unknown

Deduct reverse iterator type.

Type parameters

ValueType

ValueType<Container>: IPointer.ValueType<IteratorType<Container>>

Deduct value type.

Type parameters

Methods

[Symbol.iterator]

  • [Symbol.iterator](): IterableIterator<T>

assign

  • assign<InputIterator>(first: InputIterator, last: InputIterator): void
  • Range Assigner.

    Type parameters

    Parameters

    • first: InputIterator

      Input iteartor of the first position.

    • last: InputIterator

      Input iterator of the last position.

    Returns void

begin

  • begin(): IteratorT

clear

  • clear(): void

empty

  • empty(): boolean

end

  • end(): IteratorT

erase

  • erase(pos: IteratorT): IteratorT
  • erase(first: IteratorT, last: IteratorT): IteratorT
  • Erase an element.

    Parameters

    • pos: IteratorT

      Position to erase.

    Returns IteratorT

    Iterator following the pos, strained by the erasing.

  • Erase elements in range.

    Parameters

    • first: IteratorT

      Range of the first position to erase.

    • last: IteratorT

      Rangee of the last position to erase.

    Returns IteratorT

    Iterator following the last removed element, strained by the erasing.

push

  • push(...items: PElem[]): number

rbegin

  • rbegin(): ReverseT

rend

  • rend(): ReverseT

size

  • size(): number

swap

  • swap(obj: SourceT): void

toJSON

  • toJSON(): Array<T>

Generated using TypeDoc