child

abstract fun child(value: T, childDeclaration: ChildDeclaration<T>? = null): TreeNode<T>

This method is used to easily create child in node.

val root = tree("World") {
child("North America") {
child("USA")
}
child("Europe") {
child("Poland")
child("Germany")
}
}

Return

New created TreeNode.