Tree

utest.framework.Tree
case class Tree[+T](value: T, children: Tree[T]*)

An immutable tree with each node containing a value, and a Seq of children. Provides all normal Seq functionality as well as some tree specific methods.

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def iterator: Iterator[T]

An iterator over the values stored on the nodes of this tree, in a depth first manner starting from the root.

An iterator over the values stored on the nodes of this tree, in a depth first manner starting from the root.

Attributes

def leafPaths: Iterator[List[T]]
def leaves: Iterator[T]

Returns an iterator for the values at the leaves of this tree

Returns an iterator for the values at the leaves of this tree

Attributes

def length: Int

The number of nodes in this tree.

The number of nodes in this tree.

Attributes

def map[V](f: T => V): Tree[V]
def prefix[A >: T](p: A): Tree[A]
def toSeq: Seq[T]

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product