collect-your-stuff
    Preparing search index...

    Class DoublyLinkedList

    DoublyLinkedList represents a collection stored as a LinkedList with prev and next references.

    Implements

    Index
    classType: typeof DoublyLinkedList = DoublyLinkedList

    The class used to create this instance, so that it can be recognized as valid without an instanceof check.

    initialized: boolean = false

    Whether the inner list has been initialized (it can only be initialized once).

    innerList: DoubleLinker = null

    A linker of the list (null when the list is empty); the head is found by walking back from it.

    linkerClass: typeof DoubleLinker

    The class used to wrap the data given to this list as linkers.

    • get length(): number

      Return the length of the list. It is kept up to date by the list's own methods, so this does not walk the list (call reset() after linkers were changed directly).

      Returns number

    • Convert an array into a DoublyLinkedList instance, return the new instance.

      Parameters

      • values: any[] = []

        An array of values which will be converted to linkers in this doubly-linked-list

      • linkerClass: typeof DoubleLinker = DoubleLinker

        The class to use for each linker

      • classType: any = DoublyLinkedList

        Provide the type of IsArrayable to use.

      Returns any