collect-your-stuff
    Preparing search index...

    Class LinkedTreeList

    LinkedTreeList represents a collection stored with a root and spreading in branching (tree) formation.

    Implements

    Index
    classType: typeof LinkedTreeList = LinkedTreeList

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

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

    linkerClass: typeof TreeLinker

    The class used to wrap the data given to this list as tree 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 LinkedTreeList instance, return the new instance.

      Parameters

      • values: any[] = []

        An array of values which will be converted to nodes in this tree-list

      • linkerClass: typeof TreeLinker = TreeLinker

        The class to use for each node

      • classType: any = LinkedTreeList

        Provide the type of IsArrayable to use.

      Returns any