Package-level declarations
Types
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
data class TreeConnectors(val branch: String, val vertical: String, val lastBranch: String, val empty: String)
The four glyph strings used to draw the tree branches in prettyString.
Properties
Functions
Link copied to clipboard
fun <T> TreeNode<T>.asSequence(order: TreeNodeIterators = TreeNodeIterators.PreOrder): Sequence<TreeNode<T>>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun <T> TreeNode<T>.prettyString(connectors: TreeConnectors = TreeConnectors.Default, render: (value: T, depth: Int, isLast: Boolean) -> String = { value, _, _ -> "$value" }): String
Renders this subtree as a multi-line string, one node per line, with branch connectors.
Link copied to clipboard
Link copied to clipboard
inline fun <T> tree(root: T, defaultIterator: TreeNodeIterators = TreeNodeIterators.PreOrder, childDeclaration: ChildDeclaration<T>): TreeNode<T>
This method can be used to initialize new tree.