case class BTree[T](value: T, left: Option[BTree[T]], right: Option[BTree[T]]) extends Product with Serializable
An immutable Binary Tree.
Linear Supertypes
Ordering
- Alphabetic
- By Inheritance
Inherited
- BTree
- Serializable
- Serializable
- Product
- Equals
- AnyRef
- Any
- Hide All
- Show All
Visibility
- Public
- All
Value Members
- def foreach(f: (T) ⇒ Unit): Unit
-
def
greatest: T
The value of the right-most descendant node in this Tree.
- val left: Option[BTree[T]]
-
def
lowest: T
The value of the left-most descendant node in this Tree.
- def pretty: String
- val right: Option[BTree[T]]
-
def
searchWith[S](other: S, pred: (S, BTree[T]) ⇒ Either[Option[BTree[T]], T]): Option[T]
A generalized binary search with a custom "target test" predicate.
- val value: T