trait BinaryTree[+T] extends AnyRef
Created by chris on 1/27/16.
Linear Supertypes
Known Subclasses
Ordering
- Alphabetic
- By Inheritance
Inherited
- BinaryTree
- AnyRef
- Any
- Hide All
- Show All
Visibility
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def contains[T](t: T)(f: (T) => Boolean = (x: T) => x == t)(implicit tree: BinaryTree[T] = this): Boolean
Checks if the BinaryTree contains a certain element.
- def count[T](t: T): Int
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- def findFirstDFS[T](t: T)(f: (T) => Boolean = (x: T) => x == t)(implicit tree: BinaryTree[T] = this): Option[BinaryTree[T]]
A function to find the first occurrence of a predicate inside a BinaryTree.
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def insert[T](subTree: BinaryTree[T])(implicit parentTree: BinaryTree[T]): BinaryTree[T]
Inserts a tree into one of the two branches in a BinaryTree If it cannot insert it because the branches are not empty, it throws a RuntimeException.
- def insert[T](t: T)(implicit tree: BinaryTree[T] = this): BinaryTree[T]
Inserts an element into one of the two branches in a BinaryTree.
Inserts an element into one of the two branches in a BinaryTree. If it cannot insert it because the branches are not empty, it throws a RuntimeException.
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def left: Option[BinaryTree[T]]
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def remove[T](subTree: BinaryTree[T])(parentTree: BinaryTree[T] = this): BinaryTree[T]
Removes the subTree from the parentTree.
- def replace[T](originalTree: BinaryTree[T], replacementTree: BinaryTree[T])(implicit parentTree: BinaryTree[T] = this): BinaryTree[T]
Replaces all instances of the original tree with the replacement tree.
- def right: Option[BinaryTree[T]]
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toList: List[T]
- def toSeq: Seq[T]
- def toSeqLeafValues: Seq[T]
Creates a sequence with only the leaf values evaluates as depth first from left to right.
- def toString(): String
- Definition Classes
- AnyRef → Any
- def value: Option[T]
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()