child

open override fun child(value: T, childDeclaration: ChildDeclaration<T>?): 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.