Create the new LinkedTreeList instance, configure the list class.
The class used to wrap given data as tree linkers.
ReadonlyclassThe class used to create this instance, so that it can be recognized as valid without an instanceof check.
Whether the inner list has been initialized (it can only be initialized once).
A linker of the list (null when the list is empty); the head is found by walking back from it.
The class used to wrap the data given to this list as tree linkers.
Retrieve the first TreeLinker in the list.
Retrieve the last TreeLinker in the list. The end is remembered, so this does not walk the list.
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).
Retrieve the innerList used (the list itself, not a copy).
Get the parent of this tree list: the node these linkers are the children of (remembered even while the list is empty), or null for the linkers at the top of a tree.
Set the parent of this tree list: every linker in it gets the node as its parent, and the node gets this list as its children. Linkers added to the list later get this parent too.
The new node to use as the parent for this group of children
Return the root parent of the entire tree.
Be able to iterate over this class: the linkers of this list and everything below them (left-first). It stays within this list (it does not start at, or climb up to, the parents), use the parseTree service to parse a whole tree.
Add a node (or data) after the given (or last) node in the list.
The new node to add to the end of the list
The existing last node
Be able to run forEach on this LinkedTreeList to iterate over the TreeLinker Items.
The function to call for-each tree node
Optional, 'this' reference
The list which was iterated.
Initialize the inner list, should only run once.
Give the list of tree-linkers to start in this linked-tree-list.
Insert a new node (or data) after a node. The new node gets the parent of this list.
The existing node as reference, or null to insert at the start of the list
The new node to go after the existing node
Insert a new node (or data) before a node. The new node gets the parent of this list.
The existing node as reference, or null to insert at the end of the list
The new node to go before the existing node
Retrieve a TreeLinker item from this list by numeric index, otherwise return null.
The integer number for retrieving a node by position.
Add a node (or data) before the given (or first) node in the list.
The new node to add to the start of the list
The existing first node
Remove a linker from this linked list. The removed node no longer has a parent.
The node we wish to remove (and it will be returned after removal)
The removed node, or null when there was nothing to remove
Refresh all references (the head, the end and the length) by walking the list once, and return the head. The list's own methods keep these up to date, so this is only needed after linkers were changed directly.
Set the children on a parent item.
The TreeLinker node (one of the linkers of this list) that will be the parent of the children
The LinkedTreeList which has the child nodes to use, or null to remove the children of the item
StaticfromConvert an array into a LinkedTreeList instance, return the new instance.
An array of values which will be converted to nodes in this tree-list
The class to use for each node
Provide the type of IsArrayable to use.
LinkedTreeList represents a collection stored with a root and spreading in branching (tree) formation.