Package io.jmix.core.common.datastruct
Class Tree<T>
java.lang.Object
io.jmix.core.common.datastruct.Tree<T>
- Type Parameters:
- T- type of tree node data
- All Implemented Interfaces:
- Serializable
- See Also:
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionReturn the first root Node of the tree.Return the root nodes of the tree.voidsetRootNodes(List<Node<T>> rootNodes) Set the root Element for the tree.toList()Returns theTree<T>as a List ofNode<T>objects.toString()Returns a String representation of the Tree.
- 
Constructor Details- 
Treepublic Tree()
- 
Tree
- 
Tree
 
- 
- 
Method Details- 
getRootNodeReturn the first root Node of the tree.- Returns:
- the root element.
 
- 
getRootNodesReturn the root nodes of the tree.- Returns:
- the root elements.
 
- 
setRootNodesSet the root Element for the tree.- Parameters:
- rootNodes- the root element to set.
 
- 
toListReturns theTree<T>as a List ofNode<T>objects. The elements of the List are generated from a pre-order traversal of the tree.- Returns:
- a List<Node<T>>.
 
- 
toStringReturns a String representation of the Tree. The elements are generated from a pre-order traversal of the Tree.
 
-