TreeNode

interface TreeNode

Tree node that represents internal structure of config/source.

Functions

contains
Link copied to clipboard
open operator fun contains(path: Path): Boolean
Whether this tree node contains node(s) in specified path or not.
firstPath
Link copied to clipboard
open fun firstPath(predicate: (TreeNode) -> Boolean): Path?
getOrNull
Link copied to clipboard
open fun getOrNull(path: String): TreeNode?
Returns tree node in specified path if this tree node contains value(s) in specified path, null otherwise.
open fun getOrNull(path: Path): TreeNode?
Returns tree node in specified path if this tree node contains value(s) in specified path, null otherwise.
isEmpty
Link copied to clipboard
open fun isEmpty(): Boolean
isPlaceHolderNode
Link copied to clipboard
open fun isPlaceHolderNode(): Boolean
minus
Link copied to clipboard
open operator fun minus(other: TreeNode): TreeNode
Returns a tree node containing all nodes of the original tree node except the nodes contained in the given other tree node.
plus
Link copied to clipboard
open operator fun plus(facade: TreeNode): TreeNode
Returns a node overlapped by the specified facade node.
set
Link copied to clipboard
open operator fun set(path: String, node: TreeNode)
Associate path with specified node.
open operator fun set(path: Path, node: TreeNode)
Associate path with specified node.
withFallback
Link copied to clipboard
open fun withFallback(fallback: TreeNode): TreeNode
Returns a node backing by specified fallback node.
withoutPlaceHolder
Link copied to clipboard
open fun withoutPlaceHolder(): TreeNode

Properties

children
Link copied to clipboard
abstract val children: MutableMap<String, TreeNode>
Children nodes in this tree node with their names as keys.
leafByPath
Link copied to clipboard
open val leafByPath: Map<String, TreeNode>
Map of all leaves indexed by paths in this tree node.
paths
Link copied to clipboard
open val paths: List<String>
List of all paths in this tree node.

Inheritors

LeafNode
Link copied to clipboard
MapNode
Link copied to clipboard

Extensions

asValueOf
Link copied to clipboard
fun TreeNode.asValueOf(source: Source, type: Class<*>): Any
toHierarchical
Link copied to clipboard
fun TreeNode.toHierarchical(): Any
Returns a hierarchical value for this tree node.

Sources

jvm source
Link copied to clipboard