Options
All
  • Public
  • Public/Protected
  • All
Menu

Class DoublyLinkedList<T>

A doubly linked list

Type parameters

  • T

Hierarchy

  • DoublyLinkedList

Implements

Index

Properties

length

length: number = 0

Returns the size of the linked list

Accessors

asArray

  • get asArray(): T[]

head

  • get head(): T | undefined

isEmpty

  • get isEmpty(): boolean

tail

  • get tail(): T | undefined

Methods

add

empty

  • empty(): void

filter

fold

  • fold<C>(seed: C, f: function): C
  • Converts the linked list into a value

    Type parameters

    • C

    Parameters

    • seed: C
    • f: function
        • (value: T, seed: C): C
        • Parameters

          • value: T
          • seed: C

          Returns C

    Returns C

isConnected

map

  • Transforms the values inside the list using the transformer function, creating a new list.

    Type parameters

    • B

    Parameters

    • ab: function
        • (a: T): B
        • Parameters

          • a: T

          Returns B

    Returns ICollection<B>

pop

remove

shift

Static of

Generated using TypeDoc