Class

chain.Chain

Elems

Related Doc: package Chain

Permalink

case class Elems[A](values: Iterable[A]) extends Chain[A] with Product with Serializable

Linear Supertypes
Serializable, Serializable, Product, Equals, Chain[A], AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Elems
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. Chain
  7. AnyRef
  8. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Elems(values: Iterable[A])

    Permalink

Value Members

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

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. def ++[A1 >: A](that: Chain[A1]): Chain[A1]

    Permalink

    Concatenate two Chains.

    Concatenate two Chains.

    This is a fast O(1) operation: it simply returns a new Chain.Concat instance wrapping the arguments.

    Definition Classes
    Chain
  4. def +:[A1 >: A](a: A1): Chain[A1]

    Permalink

    Prepend a value to a Chain.

    Prepend a value to a Chain.

    (a +: x) is equivalent to (Chain.single(a) ++ x).

    Definition Classes
    Chain
  5. def :+[A1 >: A](a: A1): Chain[A1]

    Permalink

    Append a value to a Chain.

    Append a value to a Chain.

    (x :+ a) is equivalent to (x ++ Chain.single(a)).

    Definition Classes
    Chain
  6. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  7. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  8. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. def compare[A1 >: A](that: Chain[A1])(implicit ev: Ordering[A1]): Int

    Permalink

    Compare two Chain instances.

    Compare two Chain instances.

    Definition Classes
    Chain
  10. def compress: Chain[A]

    Permalink

    Compress a Chain, removing its internal structure.

    Compress a Chain, removing its internal structure.

    In general, this is an O(n) operation which will compact this Chain into a single Chain.Elems instance wrapping a vector. However, if the Chain is already compressed (i.e. Chain.Elems) this does not do any work or allocate a new Chain.

    When working with a large number of very small collections, this method can have a big impact.

    Definition Classes
    Chain
  11. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  12. def equals(that: Any): Boolean

    Permalink

    Universal equality for Chain.

    Universal equality for Chain.

    In the worst-case this is an O(n) operation, but may be faster due to type mistmatches or finding unequal elements early in the Chains.

    Definition Classes
    Chain → AnyRef → Any
  13. def exists(p: (A) ⇒ Boolean): Boolean

    Permalink

    Return whether the predicate is true for any elements or not.

    Return whether the predicate is true for any elements or not.

    Definition Classes
    Chain
  14. def filter(p: (A) ⇒ Boolean): Chain[A]

    Permalink

    Filter out some elements of a Chain given a predicate.

    Filter out some elements of a Chain given a predicate.

    This is an O(n) operation.

    The resulting Chain will naturally be compressed.

    Definition Classes
    Chain
  15. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  16. def find(p: (A) ⇒ Boolean): Option[A]

    Permalink

    Search for the first element that satisfies the given predicate.

    Search for the first element that satisfies the given predicate.

    In the worst-case this is an O(n) operation, but it will short-circuit as soon as a single match is found.

    Definition Classes
    Chain
  17. def flatMap[B](f: (A) ⇒ Chain[B]): Chain[B]

    Permalink

    Translate a Chain using the given function.

    Translate a Chain using the given function.

    This is an O(n * m) operation, where n is the length of this Chain and m represents the average length of the Chain instances produced by f.

    Definition Classes
    Chain
  18. def foldLeft[B](b: B)(f: (B, A) ⇒ B): B

    Permalink

    Combine the elements of a Chain into a single value, using a starter value and an associative function.

    Combine the elements of a Chain into a single value, using a starter value and an associative function.

    Definition Classes
    Chain
  19. def forall(p: (A) ⇒ Boolean): Boolean

    Permalink

    Return whether the predicate is true for all elements or not.

    Return whether the predicate is true for all elements or not.

    Definition Classes
    Chain
  20. def foreach(f: (A) ⇒ Unit): Unit

    Permalink

    Loop over this Chain, applying the given function.

    Loop over this Chain, applying the given function.

    This is an O(n) operation.

    Definition Classes
    Chain
  21. final def getClass(): Class[_]

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

    Permalink

    Hash codes for Chain.

    Hash codes for Chain.

    This is an O(n) operation. It is consistent with equals. This means that if (x == y) then (x.hashCode == y.hashCode).

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

    Permalink
    Definition Classes
    Any
  24. def iterator: Iterator[A]

    Permalink

    Return an iterator over the contents of this Chain.

    Return an iterator over the contents of this Chain.

    This is a fast O(1) operation, although traversing the iterator is itself an O(n) operation (which also uses O(n) heap).

    Definition Classes
    Chain
  25. def map[B](f: (A) ⇒ B): Chain[B]

    Permalink

    Translate a Chain using the given function.

    Translate a Chain using the given function.

    This is an O(n) operation.

    The resulting Chain will naturally be compressed.

    Definition Classes
    Chain
  26. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  27. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  28. final def notifyAll(): Unit

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

    Permalink
    Definition Classes
    AnyRef
  30. def toIterable: Iterable[A]

    Permalink

    Allow this Chain to be used where Iterable[A] is required.

    Allow this Chain to be used where Iterable[A] is required.

    By default Chain does not extend Iterable[A], to avoid inheriting inefficient methods from that API.

    This is a fast O(1) operation.

    Definition Classes
    Chain
  31. def toString(): String

    Permalink

    Produce a string representation of this Chain.

    Produce a string representation of this Chain.

    This is an O(n) operation, which will display the entire contents of the Chain.

    Definition Classes
    Chain → AnyRef → Any
  32. def toVector: Vector[A]

    Permalink

    Conver this Chain to a Vector.

    Conver this Chain to a Vector.

    This is an O(n) operation.

    Definition Classes
    Chain
  33. val values: Iterable[A]

    Permalink
  34. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from Chain[A]

Inherited from AnyRef

Inherited from Any

Ungrouped