sealed abstract class Chain[+A] extends AnyRef

Trivial catenable sequence. Supports O(1) append, and (amortized) O(1) uncons, such that walking the sequence via N successive uncons steps takes O(N).

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Chain
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def isEmpty: Boolean

    Returns true if there are no elements in this collection.

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ++[A2 >: A](c: Chain[A2]): Chain[A2]

    Alias for concat

  4. final def +:[A2 >: A](a: A2): Chain[A2]

    Alias for prepend.

  5. final def :+[A2 >: A](a: A2): Chain[A2]

    Alias for append.

  6. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  7. def ===[AA >: A](that: Chain[AA])(implicit A: Eq[AA]): Boolean

    Typesafe equality operator.

    Typesafe equality operator.

    This method is similar to == except that it only allows two Chain[A] values to be compared to each other, and uses equality provided by Eq[_] instances, rather than using the universal equality provided by .equals.

  8. final def append[A2 >: A](a: A2): Chain[A2]

    Returns a new Chain consisting of this followed by a.

    Returns a new Chain consisting of this followed by a. O(1) runtime.

  9. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  10. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  11. final def collect[B](pf: PartialFunction[A, B]): Chain[B]

    Collect B from this for which f is defined

  12. final def concat[A2 >: A](c: Chain[A2]): Chain[A2]

    Concatenates this with c in O(1) runtime.

  13. final def contains[AA >: A](a: AA)(implicit A: Eq[AA]): Boolean

    Check whether an element is in this structure

  14. final def deleteFirst(f: (A) ⇒ Boolean): Option[(A, Chain[A])]

    Yields to Some(a, Chain[A]) with a removed where f holds for the first time, otherwise yields None, if a was not found Traverses only until a is found.

  15. def distinct[AA >: A](implicit O: Order[AA]): Chain[AA]

    Remove duplicates.

    Remove duplicates. Duplicates are checked using Order[_] instance.

  16. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  17. def equals(o: Any): Boolean
    Definition Classes
    Chain → AnyRef → Any
  18. final def exists(f: (A) ⇒ Boolean): Boolean

    Check whether at least one element satisfies the predicate

  19. final def filter(f: (A) ⇒ Boolean): Chain[A]

    Remove elements not matching the predicate

  20. final def filterNot(f: (A) ⇒ Boolean): Chain[A]

    Remove elements matching the predicate

  21. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  22. final def find(f: (A) ⇒ Boolean): Option[A]

    Find the first element matching the predicate, if one exists

  23. final def flatMap[B](f: (A) ⇒ Chain[B]): Chain[B]

    Applies the supplied function to each element and returns a new Chain from the concatenated results

  24. final def foldLeft[B](z: B)(f: (B, A) ⇒ B): B

    Folds over the elements from left to right using the supplied initial value and function.

  25. final def foldRight[B](z: B)(f: (A, B) ⇒ B): B

    Folds over the elements from right to left using the supplied initial value and function.

  26. final def forall(f: (A) ⇒ Boolean): Boolean

    Check whether all elements satisfy the predicate

  27. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  28. final def groupBy[B](f: (A) ⇒ B)(implicit B: Order[B]): SortedMap[B, NonEmptyChain[A]]

    Groups elements inside this Chain according to the Order of the keys produced by the given mapping function.

  29. def hash[AA >: A](implicit hashA: Hash[AA]): Int
  30. def hashCode(): Int
    Definition Classes
    Chain → AnyRef → Any
  31. def headOption: Option[A]

    Returns the head of this Chain if non empty, none otherwise.

    Returns the head of this Chain if non empty, none otherwise. Amortized O(1).

  32. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  33. final def iterator: Iterator[A]
  34. final def length: Long

    Returns the number of elements in this structure

  35. final def map[B](f: (A) ⇒ B): Chain[B]

    Applies the supplied function to each element and returns a new Chain.

  36. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  37. final def nonEmpty: Boolean

    Returns false if there are no elements in this collection.

  38. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  39. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  40. final def prepend[A2 >: A](a: A2): Chain[A2]

    Returns a new Chain consisting of a followed by this.

    Returns a new Chain consisting of a followed by this. O(1) runtime.

  41. def reverse: Chain[A]

    Reverses this Chain

  42. final def reverseIterator: Iterator[A]
  43. def show[AA >: A](implicit AA: Show[AA]): String
  44. final def size: Long

    Alias for length

  45. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  46. final def toList: List[A]

    Converts to a list.

  47. def toString(): String
    Definition Classes
    Chain → AnyRef → Any
  48. final def toVector: Vector[A]

    Converts to a vector.

  49. final def uncons: Option[(A, Chain[A])]

    Returns the head and tail of this Chain if non empty, none otherwise.

    Returns the head and tail of this Chain if non empty, none otherwise. Amortized O(1).

  50. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  51. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  52. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  53. final def zipWith[B, C](other: Chain[B])(f: (A, B) ⇒ C): Chain[C]

    Zips this Chain with another Chain and applies a function for each pair of elements.

Inherited from AnyRef

Inherited from Any

Ungrouped