trait Collections extends AnyRef

Profiler driven changes. TODO - inlining doesn't work from here because of the bug that methods in traits aren't inlined.

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

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. final def bitSetByPredicate[A](xs: List[A])(pred: (A) ⇒ Boolean): BitSet
  6. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  7. final def collectFirst[A, B](as: List[A])(pf: PartialFunction[A, B]): Option[B]
  8. final def collectMap2[A, B, C](xs1: List[A], xs2: List[B])(p: (A, B) ⇒ Boolean): Map[A, B]
  9. final def compareLengths(xs1: List[_], xs2: List[_]): Int
    Annotations
    @tailrec()
  10. final def corresponds3[A, B, C](xs1: List[A], xs2: List[B], xs3: List[C])(f: (A, B, C) ⇒ Boolean): Boolean

    True if all three arguments have the same number of elements and the function is true for all the triples.

    True if all three arguments have the same number of elements and the function is true for all the triples.

    Annotations
    @tailrec()
  11. final def distinctBy[A, B](xs: List[A])(f: (A) ⇒ B): List[A]
  12. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  13. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  14. final def exists2[A, B](xs1: List[A], xs2: List[B])(f: (A, B) ⇒ Boolean): Boolean
  15. final def exists3[A, B, C](xs1: List[A], xs2: List[B], xs3: List[C])(f: (A, B, C) ⇒ Boolean): Boolean
  16. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  17. final def findOrElse[A](xs: TraversableOnce[A])(p: (A) ⇒ Boolean)(orElse: ⇒ A): A
  18. final def flatCollect[A, B](elems: List[A])(pf: PartialFunction[A, Traversable[B]]): List[B]
  19. final def flatMap2[A, B, C](xs1: List[A], xs2: List[B])(f: (A, B) ⇒ List[C]): List[C]
  20. final def flattensToEmpty(xss: Seq[Seq[_]]): Boolean
    Annotations
    @tailrec()
  21. final def foldLeft2[A1, A2, B](xs1: List[A1], xs2: List[A2])(z0: B)(f: (B, A1, A2) ⇒ B): B
  22. final def forall3[A, B, C](xs1: List[A], xs2: List[B], xs3: List[C])(f: (A, B, C) ⇒ Boolean): Boolean
  23. final def foreach2[A, B](xs1: List[A], xs2: List[B])(f: (A, B) ⇒ Unit): Unit
  24. final def foreach3[A, B, C](xs1: List[A], xs2: List[B], xs3: List[C])(f: (A, B, C) ⇒ Unit): Unit
  25. final def foreachWithIndex[A](xs: List[A])(f: (A, Int) ⇒ Unit): Unit
  26. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  27. final def hasLength(xs: List[_], len: Int): Boolean

    Again avoiding calling length, but the lengthCompare interface is clunky.

  28. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  29. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  30. final def linkedMapFrom[A, A1 >: A, B](xs: List[A])(f: (A) ⇒ B): LinkedHashMap[A1, B]
  31. final def map2[A, B, C](xs1: List[A], xs2: List[B])(f: (A, B) ⇒ C): List[C]
  32. final def map2Conserve[A <: AnyRef, B](xs: List[A], ys: List[B])(f: (A, B) ⇒ A): List[A]

    like map2, but returns list xs itself - instead of a copy - if function f maps all elements to themselves.

  33. final def map3[A, B, C, D](xs1: List[A], xs2: List[B], xs3: List[C])(f: (A, B, C) ⇒ D): List[D]
  34. final def mapFilter2[A, B, C](itA: Iterator[A], itB: Iterator[B])(f: (A, B) ⇒ Option[C]): Iterator[C]
  35. final def mapFrom[A, A1 >: A, B](xs: List[A])(f: (A) ⇒ B): Map[A1, B]
  36. final def mapList[A, B](as: List[A])(f: (A) ⇒ B): List[B]

    A version of List#map, specialized for List, and optimized to avoid allocation if as is empty

  37. final def mapWithIndex[A, B](xs: List[A])(f: (A, Int) ⇒ B): List[B]
  38. final def mexists[A](xss: List[List[A]])(p: (A) ⇒ Boolean): Boolean

    All these mm methods are "deep map" style methods for mapping etc.

    All these mm methods are "deep map" style methods for mapping etc. on a list of lists while avoiding unnecessary intermediate structures like those created via flatten.

  39. final def mfind[A](xss: List[List[A]])(p: (A) ⇒ Boolean): Option[A]
  40. final def mforall[A](xss: List[List[A]])(p: (A) ⇒ Boolean): Boolean
  41. final def mforeach[A](xss: Traversable[Traversable[A]])(f: (A) ⇒ Unit): Unit
  42. final def mforeach[A](xss: List[List[A]])(f: (A) ⇒ Unit): Unit

    These are all written in terms of List because we're trying to wring all the performance we can and List is used almost exclusively in the compiler, but people are branching out in their collections so here's an overload.

  43. final def mmap[A, B](xss: List[List[A]])(f: (A) ⇒ B): collection.immutable.List[collection.immutable.List[B]]
  44. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  45. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  46. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  47. final def sameElementsEquals(thiss: List[AnyRef], that: List[AnyRef]): Boolean
  48. final def sameLength(xs1: List[_], xs2: List[_]): Boolean

    True if two lists have the same length.

    True if two lists have the same length. Since calling length on linear sequences is O(n), it is an inadvisable way to test length equality.

  49. final def sequence[A](as: List[Option[A]]): Option[List[A]]
  50. final def sequenceOpt[A](as: List[Option[A]]): Option[List[A]]
  51. final def sumSize(xss: List[List[_]], acc: Int): Int
    Annotations
    @tailrec()
  52. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  53. def toString(): String
    Definition Classes
    AnyRef → Any
  54. final def transposeSafe[A](ass: List[List[A]]): Option[List[List[A]]]
  55. final def traverseOpt[A, B](as: List[A])(f: (A) ⇒ Option[B]): Option[List[B]]
  56. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  57. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  58. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()

Inherited from AnyRef

Inherited from Any

Ungrouped