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

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

clear

  • clear(): void

empty

  • empty(): boolean

end

erase

front

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

insert

merge

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

    Parameters

    • source: List<T>
    • Default value comp: Comparator<T> = less

    Returns 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

remove

  • remove(val: T): void

remove_if

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

rend

resize

  • resize(n: number): void

reverse

  • reverse(): void

size

  • size(): number

sort

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

    Parameters

    • Default value comp: Comparator<T> = less

    Returns void

splice

  • 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
  • inheritdoc

    Parameters

    • Default value binary_pred: BinaryPredicator<T> = equal_to

    Returns void

Generated using TypeDoc