Scalax
|
|
scalax/data/collection/Tree.scala
]
abstract
class
Tree[a]
extends
AnyRefMethod Summary | |
def
|
flatten
: scala.Stream[a]
Flatten the leaves into a single stream.
|
def
|
get
(path : scala.Seq[Int]) : a
Access a node via the given index path.
|
def
|
show
(showLeaf : (a) => java.lang.String) : java.lang.String
Show the tree as a string.
|
Methods inherited from AnyRef | |
getClass, hashCode, equals, clone, toString, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized |
Methods inherited from Any | |
==, !=, isInstanceOf, asInstanceOf |
Method Details |
def
show(showLeaf : (a) => java.lang.String) : java.lang.String
Leaf("a") ->
a
Branch(List(Leaf("a"), Leaf("b"))) ->
a
b
Branch(List(Leaf("a"), Branch(List(Leaf("b"), Leaf("c"))), Leaf("d")))
->
a
b
c
d
def
flatten : scala.Stream[a]
Scalax
|
|