collect-your-stuff
    Preparing search index...

    Class LinkedList

    LinkedList represents a collection stored as a LinkedList with next references.

    Implements

    Index
    classType: typeof LinkedList = LinkedList

    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: Linker = null

    The first linker of the list (null when the list is empty), from which the whole list is reached.

    linkerClass: typeof Linker

    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

    • Refresh the remembered end and length of the list by walking it once. The list's own methods keep these up to date, so this is only needed after linkers were changed directly (for example by setting next on a linker).

      Returns Linker

      The first linker of the list

    • Convert an array to a LinkedList.

      Parameters

      • values: any[] = []

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

      • linkerClass: typeof Linker = Linker

        The class to use for each linker

      • classType: any = LinkedList

        Provide the type of IsArrayable to use.

      Returns any