Options
All
  • Public
  • Public/Protected
  • All
Menu

Class List<T>

Doubly Linked List.

author

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

Type parameters

  • T

Hierarchy

Implements

  • IContainer<T, List<T>, Iterator<T>, ReverseIterator<T>, T>
  • ILinearContainerBase<T, List<T>, Iterator<T>, ReverseIterator<T>, T>
  • IDequeContainer<T, List<T>, Iterator<T>, ReverseIterator<T>>
  • IListAlgorithm<T, List<T>>

Index

Constructors

constructor

Methods

[Symbol.iterator]

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

assign

  • assign(n: number, val: T): void
  • assign<InputIterator>(first: InputIterator, last: InputIterator): void

back

  • back(): T
  • back(val: T): void

begin

  • begin(): Iterator<T>

clear

  • clear(): void

empty

  • empty(): boolean

end

  • end(): Iterator<T>

erase

  • erase(position: Iterator<T>): Iterator<T>
  • erase(first: Iterator<T>, last: Iterator<T>): Iterator<T>

front

  • front(): T
  • front(val: T): void

insert

  • insert(position: Iterator<T>, val: T): Iterator<T>
  • insert(position: Iterator<T>, size: number, val: T): Iterator<T>
  • insert<InputIterator>(position: Iterator<T>, begin: InputIterator, end: InputIterator): Iterator<T>

merge

  • merge(source: List<T>, comp?: Comparator<T>): void

pop_back

  • pop_back(): void

pop_front

  • pop_front(): void

push

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

push_back

  • push_back(val: T): void

push_front

  • push_front(val: T): void

rbegin

  • rbegin(): ReverseIterator<T>

remove

  • remove(val: T): void

remove_if

  • remove_if(pred: UnaryPredicator<T>): void

rend

  • rend(): ReverseIterator<T>

resize

  • resize(n: number): void

reverse

  • reverse(): void

size

  • size(): number

sort

  • sort(comp?: Comparator<T>): void

splice

  • splice(pos: Iterator<T>, from: List<T>): void
  • splice(pos: Iterator<T>, from: List<T>, it: Iterator<T>): void
  • splice(pos: Iterator<T>, from: List<T>, first: Iterator<T>, last: Iterator<T>): void
  • Transfer elements.

    Parameters

    • pos: Iterator<T>

      Position to insert.

    • from: List<T>

      Target container to transfer.

    Returns void

  • Transfer a single element.

    Parameters

    • pos: Iterator<T>

      Position to insert.

    • from: List<T>

      Target container to transfer.

    • it: Iterator<T>

      Position of the single element to transfer.

    Returns void

  • Transfer range elements.

    Parameters

    • pos: Iterator<T>

      Position to insert.

    • from: List<T>

      Target container to transfer.

    • first: Iterator<T>

      Range of the first position to transfer.

    • last: Iterator<T>

      Rangee of the last position to transfer.

    Returns void

swap

  • swap(obj: List<T>): void

toJSON

  • toJSON(): Array<T>

unique

  • unique(binary_pred?: BinaryPredicator<T>): void

Generated using TypeDoc