scala.collection

TraversableProxyLike

trait TraversableProxyLike[+A, +This <: TraversableLike[A, This] with Traversable[A]] extends TraversableLike[A, This] with Proxy

This trait implements a proxy for traversable objects. It forwards all calls to a different traversable object

known subclasses: IterableProxyLike, TraversableProxy

Inherits

  1. Proxy
  2. TraversableLike
  3. HasNewBuilder
  4. AnyRef
  5. Any

Type Members

  1. class WithFilter extends AnyRef

    A class supporting filtered operations

Value Members

  1. def ++[B >: A, That](that: Iterator[B])(bf: CanBuildFrom[This, B, That]): That

    Concatenates this traversable collection with the elements of an iterator

    Concatenates this traversable collection with the elements of an iterator.

    B

    the element type of the returned collection.

    That

    the class of the returned collection. Where possible, That is the same class as the current collection class Repr, but this depends on the element type B being admissible for that class, which means that an implicit instance of type CanBuildFrom[Repr, B, That] is found.

    that

    the iterator to append.

    bf

    an implicit value of class CanBuildFrom which determines the result class That from the current representation type Repr and and the new element type B.

    returns

    a new collection of type That which contains all elements of this traversable collection followed by all elements of that.

  2. def ++[B >: A, That](that: Traversable[B])(bf: CanBuildFrom[This, B, That]): That

    Concatenates this traversable collection with the elements of a traversable collection

    Concatenates this traversable collection with the elements of a traversable collection.

    B

    the element type of the returned collection.

    That

    the class of the returned collection. Where possible, That is the same class as the current collection class Repr, but this depends on the element type B being admissible for that class, which means that an implicit instance of type CanBuildFrom[Repr, B, That] is found.

    that

    the traversable to append.

    bf

    an implicit value of class CanBuildFrom which determines the result class That from the current representation type Repr and and the new element type B.

    returns

    a new collection of type That which contains all elements of this traversable collection followed by all elements of that.

  3. def /:[B](z: B)(op: (B, A) ⇒ B): B

    Applies a binary operator to a start value and all elements of this traversable collection, going left to right

    Applies a binary operator to a start value and all elements of this traversable collection, going left to right.

    Note: /: is alternate syntax for foldLeft; z /: xs is the same as xs foldLeft z.

    Note: will not terminate for infinite-sized collections.

    Note: might return different results for different runs, unless the underlying collection type is ordered. or the operator is associative and commutative.

    B

    the result type of the binary operator.

    z

    the start value.

    op

    the binary operator.

    returns

    the result of inserting op between consecutive elements of this traversable collection$, going left to right with the start value z on the left: {{{ op(...op(op(z, x1), x2), ..., xn) }}} where x,,1,,, ..., x,,n,, are the elements of this traversable collection.

  4. def :\[B](z: B)(op: (A, B) ⇒ B): B

    Applies a binary operator to all elements of this traversable collection and a start value, going right to left

    Applies a binary operator to all elements of this traversable collection and a start value, going right to left.

    Note: :\ is alternate syntax for foldRight; xs :\ z is the same as xs foldRight z.

    Note: will not terminate for infinite-sized collections.

    Note: might return different results for different runs, unless the underlying collection type is ordered. or the operator is associative and commutative.

    B

    the result type of the binary operator.

    z

    the start value

    op

    the binary operator

    returns

    the result of inserting op between consecutive elements of this traversable collection$, going right to left with the start value z on the right: {{{ op(x1, op(x2, ... op(xn, z)...)) }}} where x,,1,,, ..., x,,n,, are the elements of this traversable collection.

  5. def addString(b: StringBuilder): StringBuilder

    Appends all elements of this traversable collection to a string builder

    Appends all elements of this traversable collection to a string builder. The written text consists of the string representations (w.r.t. the method toString) of all elements of this traversable collection without any separator string.

    b

    the string builder to which elements are appended.

    returns

    the string builder b to which elements were appended.

  6. def addString(b: StringBuilder, sep: String): StringBuilder

    Appends all elements of this traversable collection to a string builder using a separator string

    Appends all elements of this traversable collection to a string builder using a separator string. The written text consists of the string representations (w.r.t. the method toString) of all elements of this traversable collection, separated by the string sep.

    b

    the string builder to which elements are appended.

    sep

    the separator string.

    returns

    the string builder b to which elements were appended.

  7. def addString(b: StringBuilder, start: String, sep: String, end: String): StringBuilder

    Appends all elements of this traversable collection to a string builder using start, end, and separator strings

    Appends all elements of this traversable collection to a string builder using start, end, and separator strings. The written text begins with the string start and ends with the string end. Inside, the string representations (w.r.t. the method toString) of all elements of this traversable collection are separated by the string sep.

    b

    the string builder to which elements are appended.

    start

    the starting string.

    sep

    the separator string.

    end

    the ending string.

    returns

    the string builder b to which elements were appended.

  8. def copyToArray[B >: A](xs: Array[B], start: Int): Unit

    Copies elements of this traversable collection to an array

    Copies elements of this traversable collection to an array. Fills the given array xs with all elements of this traversable collection, starting at position start. Copying will stop once either the end of the current traversable collection is reached, or the end of the array is reached.

    Note: will not terminate for infinite-sized collections.

    B

    the type of the elements of the array.

    xs

    the array to fill.

    start

    the starting index.

  9. def copyToArray[B >: A](xs: Array[B], start: Int, len: Int): Unit

    Copies elements of this traversable collection to an array

    Copies elements of this traversable collection to an array. Fills the given array xs with at most len elements of this traversable collection, starting at position start. Copying will stop once either the end of the current traversable collection is reached, or the end of the array is reached, or len elements have been copied.

    Note: will not terminate for infinite-sized collections.

    B

    the type of the elements of the array.

    xs

    the array to fill.

    start

    the starting index.

    len

    the maximal number of elements to copy.

  10. def copyToArray[B >: A](xs: Array[B]): Unit

    Copies elements of this traversable collection to an array

    Copies elements of this traversable collection to an array. Fills the given array xs with all elements of this traversable collection, starting at position 0. Copying will stop once either the end of the current traversable collection is reached, or the end of the array is reached.

    Note: will not terminate for infinite-sized collections.

    B

    the type of the elements of the array.

    xs

    the array to fill.

    definition classes: TraversableLike
  11. def copyToBuffer[B >: A](dest: Buffer[B]): Unit

    Copies all elements of this traversable collection to a buffer

    Copies all elements of this traversable collection to a buffer.

    Note: will not terminate for infinite-sized collections.

    dest

    The buffer to which elements are copied.

  12. def count(p: (A) ⇒ Boolean): Int

    Counts the number of elements in the traversable collection which satisfy a predicate

    Counts the number of elements in the traversable collection which satisfy a predicate.

    p

    the predicate used to test elements.

    returns

    the number of elements satisfying the predicate p.

  13. def drop(n: Int): This

    Selects all elements except first n ones

    Selects all elements except first n ones.

    Note: might return different results for different runs, unless the underlying collection type is ordered.

    n

    the number of elements to drop from this traversable collection.

    returns

    a traversable collection consisting of all elements of this traversable collection except the first n ones, or else the empty traversable collection, if this traversable collection has less than n elements.

  14. def dropWhile(p: (A) ⇒ Boolean): This

    Drops longest prefix of elements that satisfy a predicate

    Drops longest prefix of elements that satisfy a predicate.

    Note: might return different results for different runs, unless the underlying collection type is ordered.

    p

    The predicate used to test elements.

    returns

    the longest suffix of this traversable collection whose first element does not satisfy the predicate p.

  15. def equals(that: Any): Boolean

    This method is used to compare the receiver object (this) with the argument object (arg0) for equivalence

    This method is used to compare the receiver object (this) with the argument object (arg0) for equivalence.

    The default implementations of this method is an equivalence relation:

    • It is reflexive: for any instance x of type Any, x.equals(x) should return true.
    • It is symmetric: for any instances x and y of type Any, x.equals(y) should return true if and only if y.equals(x) returns true.
    • It is transitive: for any instances x, y, and z of type AnyRef if x.equals(y) returns true and y.equals(z) returns true, then x.equals(z) should return true.

    If you override this method, you should verify that your implementation remains an equivalence relation. Additionally, when overriding this method it is often necessary to override hashCode to ensure that objects that are "equal" (o1.equals(o2) returns true) hash to the same Int (o1.hashCode.equals(o2.hashCode)).

    definition classes: Proxy ⇐ AnyRef ⇐ Any
  16. def exists(p: (A) ⇒ Boolean): Boolean

    Tests whether a predicate holds for some of the elements of this traversable collection

    Tests whether a predicate holds for some of the elements of this traversable collection.

    Note: may not terminate for infinite-sized collections.

    p

    the predicate used to test elements.

    returns

    true if the given predicate p holds for some of the elements of this traversable collection, otherwise false.

  17. def filter(p: (A) ⇒ Boolean): This

    Selects all elements of this traversable collection which satisfy a predicate

    Selects all elements of this traversable collection which satisfy a predicate.

    p

    the predicate used to test elements.

    returns

    a new traversable collection consisting of all elements of this traversable collection that satisfy the given predicate p. The order of the elements is preserved.

  18. def filterNot(p: (A) ⇒ Boolean): This

    Selects all elements of this traversable collection which do not satisfy a predicate

    Selects all elements of this traversable collection which do not satisfy a predicate.

    p

    the predicate used to test elements.

    returns

    a new traversable collection consisting of all elements of this traversable collection that do not satisfy the given predicate p. The order of the elements is preserved.

  19. def find(p: (A) ⇒ Boolean): Option[A]

    Finds the first element of the traversable collection satisfying a predicate, if any

    Finds the first element of the traversable collection satisfying a predicate, if any.

    Note: may not terminate for infinite-sized collections.

    Note: might return different results for different runs, unless the underlying collection type is ordered.

    p

    the predicate used to test elements.

    returns

    an option value containing the first element in the traversable collection that satisfies p, or None if none exists.

  20. def flatMap[B, That](f: (A) ⇒ Traversable[B])(bf: CanBuildFrom[This, B, That]): That

    Builds a new collection by applying a function to all elements of this traversable collection and concatenating the results

    Builds a new collection by applying a function to all elements of this traversable collection and concatenating the results.

    B

    the element type of the returned collection.

    That

    the class of the returned collection. Where possible, That is the same class as the current collection class Repr, but this depends on the element type B being admissible for that class, which means that an implicit instance of type CanBuildFrom[Repr, B, That] is found.

    f

    the function to apply to each element.

    bf

    an implicit value of class CanBuildFrom which determines the result class That from the current representation type Repr and and the new element type B.

    returns

    a new collection of type That resulting from applying the given collection-valued function f to each element of this traversable collection and concatenating the results.

  21. def foldLeft[B](z: B)(op: (B, A) ⇒ B): B

    Applies a binary operator to a start value and all elements of this traversable collection, going left to right

    Applies a binary operator to a start value and all elements of this traversable collection, going left to right.

    Note: will not terminate for infinite-sized collections.

    Note: might return different results for different runs, unless the underlying collection type is ordered. or the operator is associative and commutative.

    B

    the result type of the binary operator.

    z

    the start value.

    op

    the binary operator.

    returns

    the result of inserting op between consecutive elements of this traversable collection$, going left to right with the start value z on the left: {{{ op(...op(z, x1), x2, ..., xn) }}} where x,,1,,, ..., x,,n,, are the elements of this traversable collection.

  22. def foldRight[B](z: B)(op: (A, B) ⇒ B): B

    Applies a binary operator to all elements of this traversable collection and a start value, going right to left

    Applies a binary operator to all elements of this traversable collection and a start value, going right to left.

    Note: will not terminate for infinite-sized collections.

    Note: might return different results for different runs, unless the underlying collection type is ordered. or the operator is associative and commutative.

    B

    the result type of the binary operator.

    z

    the start value.

    op

    the binary operator.

    returns

    the result of inserting op between consecutive elements of this traversable collection$, going right to left with the start value z on the right: {{{ op(x1, op(x2, ... op(xn, z)...)) }}} where x,,1,,, ..., x,,n,, are the elements of this traversable collection.

  23. def forall(p: (A) ⇒ Boolean): Boolean

    Tests whether a predicate holds for all elements of this traversable collection

    Tests whether a predicate holds for all elements of this traversable collection.

    Note: may not terminate for infinite-sized collections.

    p

    the predicate used to test elements.

    returns

    true if the given predicate p holds for all elements of this traversable collection, otherwise false.

  24. def foreach[B](f: (A) ⇒ B): Unit

    Applies a function f to all elements of this traversable collection

    Applies a function f to all elements of this traversable collection.

    Note: this method underlies the implementation of most other bulk operations. It's important to implement this method in an efficient way.

    f

    the function that is applied for its side-effect to every element. The result of function f is discarded.

  25. def groupBy[K](f: (A) ⇒ K): Map[K, This]

    Partitions this traversable collection into a map of traversable collections according to some discriminator function

    Partitions this traversable collection into a map of traversable collections according to some discriminator function.

    Note: this method is not re-implemented by views. This means when applied to a view it will always force the view and return a new traversable collection.

    K

    the type of keys returned by the discriminator function.

    f

    the discriminator function.

    returns

    A map from keys to traversable collections such that the following invariant holds: {{{ (xs partition f)(k) = xs filter (x => f(x) == k) }}} That is, every key k is bound to a traversable collection of those elements x for which f(x) equals k.

  26. def hasDefiniteSize: Boolean

    Tests whether this traversable collection is known to have a finite size

    Tests whether this traversable collection is known to have a finite size. All strict collections are known to have finite size. For a non-strict collection such as Stream, the predicate returns true if all elements have been computed. It returns false if the stream is not yet evaluated to the end.

    Note: many collection methods will not work on collections of infinite sizes.

  27. def hashCode(): Int

    Returns a hash code value for the object

    Returns a hash code value for the object.

    The default hashing algorithm is platform dependent.

    Note that it is allowed for two objects to have identical hash codes (o1.hashCode.equals(o2.hashCode)) yet not be equal (o1.equals(o2) returns false). A degenerate implementation could always return 0. However, it is required that if two objects are equal (o1.equals(o2) returns true) that they have identical hash codes (o1.hashCode.equals(o2.hashCode)). Therefore, when overriding this method, be sure to verify that the behavior is consistent with the equals method.

    definition classes: Proxy ⇐ AnyRef ⇐ Any
  28. def head: A

    Selects the first element of this traversable collection

    Selects the first element of this traversable collection.

    Note: might return different results for different runs, unless the underlying collection type is ordered.

  29. def headOption: Option[A]

    Optionally selects the first element

    Optionally selects the first element.

    Note: might return different results for different runs, unless the underlying collection type is ordered.

  30. def init: This

    Selects all elements except the last

    Selects all elements except the last.

    Note: might return different results for different runs, unless the underlying collection type is ordered.

  31. def isEmpty: Boolean

    Tests whether this traversable collection is empty

    Tests whether this traversable collection is empty.

  32. def last: A

    Selects the last element

    Selects the last element.

    Note: might return different results for different runs, unless the underlying collection type is ordered.

  33. def lastOption: Option[A]

    Optionally selects the last element

    Optionally selects the last element.

    Note: might return different results for different runs, unless the underlying collection type is ordered.

  34. def map[B, That](f: (A) ⇒ B)(bf: CanBuildFrom[This, B, That]): That

    Builds a new collection by applying a function to all elements of this traversable collection

    Builds a new collection by applying a function to all elements of this traversable collection.

    B

    the element type of the returned collection.

    That

    the class of the returned collection. Where possible, That is the same class as the current collection class Repr, but this depends on the element type B being admissible for that class, which means that an implicit instance of type CanBuildFrom[Repr, B, That] is found.

    f

    the function to apply to each element.

    bf

    an implicit value of class CanBuildFrom which determines the result class That from the current representation type Repr and and the new element type B.

    returns

    a new collection of type That resulting from applying the given function f to each element of this traversable collection and collecting the results.

  35. def max[B >: A](cmp: Ordering[B]): A

    Finds the largest element

    Finds the largest element.

    B

    The type over which the ordering is defined.

    cmp

    An ordering to be used for comparing elements.

    returns

    the largest element of this traversable collection with respect to the ordering cmp.

    definition classes: TraversableLike
  36. def min[B >: A](cmp: Ordering[B]): A

    Finds the smallest element

    Finds the smallest element.

    B

    The type over which the ordering is defined.

    cmp

    An ordering to be used for comparing elements.

    returns

    the smallest element of this traversable collection with respect to the ordering cmp.

    definition classes: TraversableLike
  37. def mkString: String

    Displays all elements of this traversable collection in a string

    Displays all elements of this traversable collection in a string.

  38. def mkString(sep: String): String

    Displays all elements of this traversable collection in a string using a separator string

    Displays all elements of this traversable collection in a string using a separator string.

    sep

    the separator string.

    returns

    a string representation of this traversable collection. In the resulting string the string representations (w.r.t. the method toString) of all elements of this traversable collection are separated by the string sep.

  39. def mkString(start: String, sep: String, end: String): String

    Displays all elements of this traversable collection in a string using start, end, and separator strings

    Displays all elements of this traversable collection in a string using start, end, and separator strings.

    start

    the starting string.

    sep

    the separator string.

    end

    the ending string.

    returns

    a string representation of this traversable collection. The resulting string begins with the string start and ends with the string end. Inside, the string representations (w.r.t. the method toString) of all elements of this traversable collection are separated by the string sep.

  40. def nonEmpty: Boolean

    Tests whether the traversable collection is not empty

    Tests whether the traversable collection is not empty.

  41. def partialMap[B, That](pf: PartialFunction[A, B])(bf: CanBuildFrom[This, B, That]): That

    Builds a new collection by applying a partial function to all elements of this traversable collection on which the function is defined

    Builds a new collection by applying a partial function to all elements of this traversable collection on which the function is defined.

    B

    the element type of the returned collection.

    That

    the class of the returned collection. Where possible, That is the same class as the current collection class Repr, but this depends on the element type B being admissible for that class, which means that an implicit instance of type CanBuildFrom[Repr, B, That] is found.

    pf

    the partial function which filters and maps the traversable collection.

    bf

    an implicit value of class CanBuildFrom which determines the result class That from the current representation type Repr and and the new element type B.

    returns

    a new collection of type That resulting from applying the partial function pf to each element on which it is defined and collecting the results. The order of the elements is preserved.

  42. def partition(p: (A) ⇒ Boolean): (This, This)

    Partitions this traversable collection in two traversable collections according to a predicate

    Partitions this traversable collection in two traversable collections according to a predicate.

    p

    the predicate on which to partition.

    returns

    a pair of traversable collections: the first traversable collection consists of all elements that satisfy the predicate p and the second traversable collection consists of all elements that don't. The relative order of the elements in the resulting traversable collections is the same as in the original traversable collection.

  43. def product[B >: A](num: Numeric[B]): B

    Multiplies up the elements of this collection

    Multiplies up the elements of this collection.

    B

    the result type of the * operator.

    num

    an implicit parameter defining a set of numeric operations which includes the * operator to be used in forming the product.

    returns

    the product of all elements of this traversable collection with respect to the * operator in num.

    definition classes: TraversableLike
  44. def reduceLeft[B >: A](op: (B, A) ⇒ B): B

    Applies a binary operator to all elements of this traversable collection, going left to right

    Applies a binary operator to all elements of this traversable collection, going left to right.

    Note: will not terminate for infinite-sized collections.

    Note: might return different results for different runs, unless the underlying collection type is ordered. or the operator is associative and commutative.

    B

    the result type of the binary operator.

    op

    the binary operator.

    returns

    the result of inserting op between consecutive elements of this traversable collection$, going left to right: {{{ op(...(op(x1, x2), ... ) , xn) }}} where x,,1,,, ..., x,,n,, are the elements of this traversable collection.

  45. def reduceLeftOption[B >: A](op: (B, A) ⇒ B): Option[B]

    Optionally applies a binary operator to all elements of this traversable collection, going left to right

    Optionally applies a binary operator to all elements of this traversable collection, going left to right.

    Note: will not terminate for infinite-sized collections.

    Note: might return different results for different runs, unless the underlying collection type is ordered. or the operator is associative and commutative.

    B

    the result type of the binary operator.

    op

    the binary operator.

    returns

    an option value containing the result of reduceLeft(op) is this traversable collection is nonempty, None otherwise.

  46. def reduceRight[B >: A](op: (A, B) ⇒ B): B

    Applies a binary operator to all elements of this traversable collection, going right to left

    Applies a binary operator to all elements of this traversable collection, going right to left.

    Note: will not terminate for infinite-sized collections.

    Note: might return different results for different runs, unless the underlying collection type is ordered. or the operator is associative and commutative.

    B

    the result type of the binary operator.

    op

    the binary operator.

    returns

    the result of inserting op between consecutive elements of this traversable collection$, going right to left: {{{ op(x1, op(x2, ..., op(xn-1, xn)...)) }}} where x,,1,,, ..., x,,n,, are the elements of this traversable collection.

  47. def reduceRightOption[B >: A](op: (A, B) ⇒ B): Option[B]

    Optionally applies a binary operator to all elements of this traversable collection, going right to left

    Optionally applies a binary operator to all elements of this traversable collection, going right to left.

    Note: will not terminate for infinite-sized collections.

    Note: might return different results for different runs, unless the underlying collection type is ordered. or the operator is associative and commutative.

    B

    the result type of the binary operator.

    op

    the binary operator.

    returns

    an option value containing the result of reduceRight(op) is this traversable collection is nonempty, None otherwise.

  48. def repr: This

    The collection of type traversable collection underlying this TraversableLike object

    The collection of type traversable collection underlying this TraversableLike object. By default this is implemented as the TraversableLike object itself, but this can be overridden.

    definition classes: TraversableLike
  49. def self: This

  50. def size: Int

    The size of this traversable collection

    The size of this traversable collection.

    Note: will not terminate for infinite-sized collections.

  51. def slice(from: Int, until: Int): This

    Selects an interval of elements

    Selects an interval of elements.

    Note: c.slice(from, to) is equivalent to (but possibly more efficient than) c.drop(from).take(to - from)

    Note: might return different results for different runs, unless the underlying collection type is ordered.

    from

    the index of the first returned element in this traversable collection.

    until

    the index one past the last returned element in this traversable collection.

    returns

    a traversable collection containing the elements starting at index from and extending up to (but not including) index until of this traversable collection.

  52. def span(p: (A) ⇒ Boolean): (This, This)

    Spits this traversable collection into a prefix/suffix pair according to a predicate

    Spits this traversable collection into a prefix/suffix pair according to a predicate.

    Note: c span p is equivalent to (but possibly more efficient than) (c takeWhile p, c dropWhile p), provided the evaluation of the predicate p does not cause any side-effects.

    Note: might return different results for different runs, unless the underlying collection type is ordered.

    p

    the test predicate

    returns

    a pair consisting of the longest prefix of this traversable collection whose elements all satisfy p, and the rest of this traversable collection.

  53. def splitAt(n: Int): (This, This)

    Splits this traversable collection into two at a given position

    Splits this traversable collection into two at a given position. Note: c splitAt n is equivalent to (but possibly more efficient than) (c take n, c drop n).

    Note: might return different results for different runs, unless the underlying collection type is ordered.

    n

    the position at which to split.

    returns

    a pair of traversable collections consisting of the first n elements of this traversable collection, and the other elements.

  54. def stringPrefix: String

    Defines the prefix of this object's toString representation

    Defines the prefix of this object's toString representation.

  55. def sum[B >: A](num: Numeric[B]): B

    Sums up the elements of this collection

    Sums up the elements of this collection.

    B

    the result type of the + operator.

    num

    an implicit parameter defining a set of numeric operations which includes the + operator to be used in forming the sum.

    returns

    the sum of all elements of this traversable collection with respect to the + operator in num.

    definition classes: TraversableLike
  56. def tail: This

    Selects all elements except the first

    Selects all elements except the first.

    Note: might return different results for different runs, unless the underlying collection type is ordered.

  57. def take(n: Int): This

    Selects first n elements

    Selects first n elements.

    Note: might return different results for different runs, unless the underlying collection type is ordered.

    n

    Tt number of elements to take from this traversable collection.

    returns

    a traversable collection consisting only of the first n elements of this traversable collection, or else the whole traversable collection, if it has less than n elements.

  58. def takeWhile(p: (A) ⇒ Boolean): This

    Takes longest prefix of elements that satisfy a predicate

    Takes longest prefix of elements that satisfy a predicate.

    Note: might return different results for different runs, unless the underlying collection type is ordered.

    p

    The predicate used to test elements.

    returns

    the longest prefix of this traversable collection whose elements all satisfy the predicate p.

  59. def toArray[B >: A](arg0: ClassManifest[B]): Array[B]

    Converts this traversable collection to an array

    Converts this traversable collection to an array.

    Note: will not terminate for infinite-sized collections.

    B

    the type of the elements of the array. A ClassManifest for this type must be available.

    returns

    an array containing all elements of this traversable collection.

  60. def toIndexedSeq[B >: A]: IndexedSeq[B]

    Converts this traversable collection to an indexed sequence

    Converts this traversable collection to an indexed sequence.

    Note: will not terminate for infinite-sized collections.

    definition classes: TraversableLike
  61. def toIterable: Iterable[A]

    Converts this traversable collection to an iterable collection

    Converts this traversable collection to an iterable collection.

    Note: Will not terminate for infinite-sized collections.

  62. def toList: List[A]

    Converts this traversable collection to a list

    Converts this traversable collection to a list.

    Note: will not terminate for infinite-sized collections.

  63. def toSeq: Seq[A]

    Converts this traversable collection to a sequence

    Converts this traversable collection to a sequence.

    Note: will not terminate for infinite-sized collections.

  64. def toSet[B >: A]: Set[B]

    Converts this traversable collection to a set

    Converts this traversable collection to a set.

    Note: will not terminate for infinite-sized collections.

  65. def toStream: Stream[A]

    Converts this traversable collection to a stream

    Converts this traversable collection to a stream.

    Note: will not terminate for infinite-sized collections.

  66. def toString(): String

    Returns a string representation of the object

    Returns a string representation of the object.

    The default representation is platform dependent.

    definition classes: Proxy ⇐ AnyRef ⇐ Any
  67. def view(from: Int, until: Int): TraversableView[A, This]

    Creates a non-strict view of a slice of this traversable collection

    Creates a non-strict view of a slice of this traversable collection.

    Note: the difference between view and slice is that view produces a view of the current traversable collection, whereas slice produces a new traversable collection.

    Note: view(from, to) is equivalent to view.slice(from, to)

    Note: might return different results for different runs, unless the underlying collection type is ordered.

    from

    the index of the first element of the view

    until

    the index of the element following the view

    returns

    a non-strict view of a slice of this traversable collection, starting at index from and extending up to (but not including) index until.

  68. def view: TraversableView[A, This]

    Creates a non-strict view of this traversable collection

    Creates a non-strict view of this traversable collection.

  69. def withFilter(p: (A) ⇒ Boolean): WithFilter

    Creates a non-strict filter of this traversable collection

    Creates a non-strict filter of this traversable collection.

    Note: the difference between c filter p and c withFilter p is that the former creates a new collection, whereas the latter only restricts the domain of subsequent map, flatMap, foreach, and withFilter operations.

    Note: might return different results for different runs, unless the underlying collection type is ordered.

    p

    the predicate used to test elements.

    returns

    an object of class WithFilter, which supports map, flatMap, foreach, and withFilter operations. All these operations apply to those elements of this traversable collection which satify the predicate p.

    definition classes: TraversableLike