Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Node(val id: String, val comments: MutableList<String> = mutableListOf(), parent: Node?, val children: MutableList<Node> = mutableListOf()) {
- var parent: Node? by ParentDelegate(parent)
- fun isRoot(): Boolean = parent == null
- //...
- }
Add Comment
Please, Sign In to add comment