Packages

final class RoseTree[+A] extends Product with Serializable

Implements a finitely branching tree, also known as a rose tree. All methods are stack-safe.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. RoseTree
  2. Serializable
  3. Product
  4. Equals
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def canEqual(that: Any): Boolean
    Definition Classes
    RoseTree → Equals
    Annotations
    @SuppressWarnings()
  6. val children: Seq[RoseTree[A]]
  7. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  8. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  9. def equals(other: Any): Boolean
    Definition Classes
    RoseTree → Equals → AnyRef → Any
    Annotations
    @SuppressWarnings()
  10. def foldl[State, Result](init: (RoseTree[A]) => State)(finish: (State) => Result)(update: (State, Result) => State): Result

    Tail-recursive implementation equivalent to

    Tail-recursive implementation equivalent to

    def foldl[State, Result](tree: RoseTree[A])(init: RoseTree[A] => State)(finish: State => Result)(update: (State, Result) => State): Result =
      finish(children.foldLeft(init(this))((acc, child) => update(acc, child.foldl(init)(finish)(update))))
  11. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  12. def hashCode(): Int

    Tail-recursive implementation for RoseTree equivalent to scala.util.hashing.MurmurHash3$.productHash(x:Product):Int*

    Tail-recursive implementation for RoseTree equivalent to scala.util.hashing.MurmurHash3$.productHash(x:Product):Int*

    Definition Classes
    RoseTree → AnyRef → Any
  13. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  14. def map[B](f: (A) => B): RoseTree[B]

    Tail-recursive implementation equivalent to

    Tail-recursive implementation equivalent to

    def map[A](f: A => B): RoseTree[B] = RoseTree(f(root), children.map(_.map(f))*)
  15. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  16. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  17. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  18. def preorder: Iterator[A]

    Iterator over all elements in this tree in preorder

  19. def productArity: Int
    Definition Classes
    RoseTree → Product
  20. def productElement(n: Int): Any
    Definition Classes
    RoseTree → Product
  21. def productElementName(n: Int): String
    Definition Classes
    Product
  22. def productElementNames: Iterator[String]
    Definition Classes
    Product
  23. def productIterator: Iterator[Any]
    Definition Classes
    Product
  24. def productPrefix: String
    Definition Classes
    RoseTree → Product
  25. val root: A
  26. val size: Int
  27. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  28. def toString(): String
    Definition Classes
    RoseTree → AnyRef → Any
  29. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  30. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  31. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  32. def zipWith[B, C](that: RoseTree[B])(f: (A, B) => C): RoseTree[C]

    Tail-recursive implementation equivalent to

    Tail-recursive implementation equivalent to

    def zipWith[B, C](that: RoseTree[B])(f: (A, B) => C): RoseTree[C] =
      RoseTree(
        f(this.root, that.root),
        (this.children.zip(that.children).map { case (l, r) => l.zipWith(r)(f) }) *,
      )

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

    (Since version 9)

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped