trait IterableMethods[+A, +This <: IterableLike[A, This] with Iterable[A]] extends TraversableMethods[A, This]

known subclasses: SetMethods, SeqMethods, MapMethods


  1. TraversableMethods
  2. AnyRef
  3. Any

Value Members

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

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

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

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

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

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

  7. def addString(b: StringBuilder): StringBuilder

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

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

  10. def copyToBuffer[B >: A](dest: Buffer[B]): Unit

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

  12. def drop(n: Int): Traversable[A]

  13. def dropRight(n: Int): Iterable[A]

  14. def dropWhile(p: (A) ⇒ Boolean): Traversable[A]

  15. def equals(arg0: 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)).


    the object to compare against this object for equality.


    true if the receiver object is equivalent to the argument; false otherwise.

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

  17. def filter(p: (A) ⇒ Boolean): Traversable[A]

  18. def filterNot(p: (A) ⇒ Boolean): Traversable[A]

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

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

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

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

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

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

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

  26. def hasDefiniteSize: Boolean

  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: AnyRef ⇐ Any
  28. def head: A

  29. def headOption: Option[A]

  30. def init: Traversable[A]

  31. def isEmpty: Boolean

  32. def iterator: Iterator[A]

  33. def last: A

  34. def lastOption: Option[A]

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

  36. def mkString: String

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

  38. def mkString(sep: String): String

  39. def nonEmpty: Boolean

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

  41. def partition(p: (A) ⇒ Boolean): (Traversable[A], Traversable[A])

  42. def reduceLeft[B >: A](op: (B, A) ⇒ B): B

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

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

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

  46. def sameElements[B >: A](that: Iterable[B]): Boolean

  47. def size: Int

  48. def slice(from: Int, until: Int): Traversable[A]

  49. def sortWith(lt: (A, A) ⇒ Boolean)(m: ClassManifest[A]): This

  50. def span(p: (A) ⇒ Boolean): (Traversable[A], Traversable[A])

  51. def splitAt(n: Int): (Traversable[A], Traversable[A])

  52. def stringPrefix: String

  53. def tail: Traversable[A]

  54. def take(n: Int): Traversable[A]

  55. def takeRight(n: Int): Iterable[A]

  56. def takeWhile(p: (A) ⇒ Boolean): Traversable[A]

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

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

  59. def toIterable: Iterable[A]

  60. def toList: List[A]

  61. def toSeq: Seq[A]

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

  63. def toStream: Stream[A]

  64. 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: AnyRef ⇐ Any
  65. def view(from: Int, until: Int): IterableView[A, This]

  66. def view: IterableView[A, This]

  67. def zip[A1 >: A, B, That](that: Iterable[B])(bf: CanBuildFrom[This, (A1, B), That]): That

  68. def zipAll[B, A1 >: A, That](that: Iterable[B], e1: A1, e2: B)(bf: CanBuildFrom[This, (A1, B), That]): That

  69. def zipWithIndex[A1 >: A, That](bf: CanBuildFrom[This, (A1, Int), That]): That