de.sciss.fingertree

FingerTree

sealed trait FingerTree[V, +A] extends AnyRef

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. FingerTree
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. type Tree = FingerTree[V, A]

    Attributes
    protected[this]

Abstract Value Members

  1. abstract def ++[A1 >: A](right: FingerTree[V, A1])(implicit m: Measure[A1, V]): FingerTree[V, A1]

  2. abstract def +:[A1 >: A](b: A1)(implicit m: Measure[A1, V]): FingerTree[V, A1]

    Prepends an element to the tree.

    Prepends an element to the tree.

    b

    the element to prepend

    m

    the measure used to update the tree's measure

    returns

    the new tree with the element prepended

  3. abstract def :+[A1 >: A](b: A1)(implicit m: Measure[A1, V]): FingerTree[V, A1]

    Appends an element to the tree.

    Appends an element to the tree.

    b

    the element to append

    m

    the measure used to update the tree's structure

    returns

    the new tree with the element appended

  4. abstract def dropWhile(pred: (V) ⇒ Boolean)(implicit m: Measure[A, V]): Tree

  5. abstract def dropWhile1(pred: (V) ⇒ Boolean, init: V)(implicit m: Measure[A, V]): (A, Tree)

  6. abstract def find1(pred: (V) ⇒ Boolean)(implicit m: Measure[A, V]): (V, A)

    Traverses the tree until a predicate on an element becomes true, and then returns that element.

    Traverses the tree until a predicate on an element becomes true, and then returns that element. Note that if pred returns false for every element, the last element in the tree is returned (rather than a runtime exception being thrown).

    If the tree is empty, this throws a runtime exception.

    pred

    a test function applied to the elements of the tree from left to right, until a the test returns true.

    returns

    the discerning element

  7. abstract def head: A

    Returns the first (left-most) element in the tree.

    Returns the first (left-most) element in the tree. Throws a runtime exception if performed on an empty tree.

    returns

    the head element

  8. abstract def headOption: Option[A]

    Returns the first (left-most) element in the tree as an option.

    Returns the first (left-most) element in the tree as an option.

    returns

    the head element (Some), or None if the tree is empty

  9. abstract def init(implicit m: Measure[A, V]): Tree

    Drops the last element of the tree.

    Drops the last element of the tree.

    returns

    the tree where the last element has been removed

  10. abstract def isEmpty: Boolean

    Queries whether the tree is empty or not

    Queries whether the tree is empty or not

    returns

    true if the tree is empty

  11. abstract def iterator: Iterator[A]

    Creates an Iterator over the elements of the tree

    Creates an Iterator over the elements of the tree

    returns

    a fresh Iterator for the tree elements

  12. abstract def last: A

    Returns the last (right-most) element in the tree.

    Returns the last (right-most) element in the tree. Throws a runtime exception if performed on an empty tree.

    returns

    the last element

  13. abstract def lastOption: Option[A]

    Returns the last (right-most) element in the tree as an option.

    Returns the last (right-most) element in the tree as an option.

    returns

    the last element (Some), or None if the tree is empty

  14. abstract def measure: V

    Queries the measure of the tree, which might be its size or sum

    Queries the measure of the tree, which might be its size or sum

    returns

    the measure of the tree

  15. abstract def span(pred: (V) ⇒ Boolean)(implicit m: Measure[A, V]): (Tree, Tree)

    Same as span1, but prepends the discerning element to the right tree, returning the left and right tree.

    Same as span1, but prepends the discerning element to the right tree, returning the left and right tree. Unlike span1, this is an allowed operation on an empty tree.

    pred

    a test function applied to the elements of the tree from left to right, until a the test returns false.

    returns

    the split tree, as a Tuple2 with the left and the right tree

  16. abstract def span1(pred: (V) ⇒ Boolean)(implicit m: Measure[A, V]): (Tree, A, Tree)

    Traverses the tree until a predicate on an element becomes false, and then splits the tree, returning the elements before that element (the prefix for which the predicate holds), the element itself (the first for which the predicate does not hold), and the remaining elements.

    Traverses the tree until a predicate on an element becomes false, and then splits the tree, returning the elements before that element (the prefix for which the predicate holds), the element itself (the first for which the predicate does not hold), and the remaining elements.

    This method is somewhat analogous to the span method in standard Scala collections, the difference being that the predicate tests the tree's measure and not individual elements.

    Note that the returned discerning element corresponds to the last element in the tree, if pred returns true for every element (rather than a runtime exception being thrown).

    If the tree is empty, this throws a runtime exception.

    pred

    a test function applied to the elements of the tree from left to right, until a the test returns true.

    returns

    the split tree, as a Tuple3 with the left tree, the discerning element, and the right tree

  17. abstract def tail(implicit m: Measure[A, V]): Tree

    Returns a copy of the tree with the first (head) element removed.

    Returns a copy of the tree with the first (head) element removed. Throws a runtime exception if performed on an empty tree.

    m

    the measure used to update the tree's structure

    returns

    the new tree with the first element removed

  18. abstract def takeWhile(pred: (V) ⇒ Boolean)(implicit m: Measure[A, V]): Tree

  19. abstract def takeWhile1(pred: (V) ⇒ Boolean, init: V)(implicit m: Measure[A, V]): (Tree, A)

  20. abstract def to[Col[_]](implicit cbf: CanBuildFrom[Nothing, A, Col[A]]): Col[A]

  21. abstract def toList: List[A]

    Converts the tree to a List representation.

    Converts the tree to a List representation.

    returns

    a List constructed from the elements in the tree

  22. abstract def viewLeft(implicit m: Measure[A, V]): ViewLeft[V, A]

  23. abstract def viewRight(implicit m: Measure[A, V]): ViewRight[V, A]

Concrete Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  9. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  10. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  11. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  12. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  13. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  14. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  15. final def notify(): Unit

    Definition Classes
    AnyRef
  16. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  17. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  18. def toString(): String

    Definition Classes
    AnyRef → Any
  19. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  20. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  21. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped