Options
All
  • Public
  • Public/Protected
  • All
Menu

A dynamic, singlely linked list.

Type parameters

  • T

Hierarchy

  • LinkedList

Implements

  • Iterable<T>

Index

Constructors

constructor

  • Consstructs an empty linked list.

    Returns LinkedList

Methods

__@iterator

  • __@iterator(): Iterator<T>
  • Returns an iterator over the elements in the list

    Returns Iterator<T>

first

  • first(): T
  • Returns the first element in the list, or null if the list is empty.

    Returns T

insert

  • insert(element: T): void
  • Inserts a node at the beginning of the list

    Parameters

    • element: T

    Returns void

remove

  • remove(): boolean
  • Removes the first element in the list. Returns true if element was successfully removed, false otherwise.

    Returns boolean

toString

  • toString(): string
  • Prints out the string reprsentation of this linked list.

    Returns string

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Type alias with type parameter
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method

Generated using TypeDoc