TreeBuilder

Generically builds a tree structure out of a flat sequence of elements with a Path property that signifies the position in the tree. Essentially factors recursion out of the tree building process.

class Object
trait Matchable
class Any

Value members

Concrete methods

def build[C <: Navigatable, T <: C](content: Seq[C], buildNode: (Path, Seq[C]) => T): T

Builds a tree structure from the specified leaf elements, using the given builder function. The function will be invoked for each node recursively, with the path for the node to build and the child nodes that are immediate children of the node to build.

Builds a tree structure from the specified leaf elements, using the given builder function. The function will be invoked for each node recursively, with the path for the node to build and the child nodes that are immediate children of the node to build.