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.
- Alphabetic
- By Inheritance
- Collections
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
- final def bitSetByPredicate[A](xs: List[A])(pred: (A) ⇒ Boolean): BitSet
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
- final def collectFirst[A, B](as: List[A])(pf: PartialFunction[A, B]): Option[B]
- final def collectMap2[A, B, C](xs1: List[A], xs2: List[B])(p: (A, B) ⇒ Boolean): Map[A, B]
-
final
def
compareLengths(xs1: List[_], xs2: List[_]): Int
- Annotations
- @tailrec()
-
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()
- final def distinctBy[A, B](xs: List[A])(f: (A) ⇒ B): List[A]
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def exists2[A, B](xs1: List[A], xs2: List[B])(f: (A, B) ⇒ Boolean): Boolean
- final def exists3[A, B, C](xs1: List[A], xs2: List[B], xs3: List[C])(f: (A, B, C) ⇒ Boolean): Boolean
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
- final def findOrElse[A](xs: TraversableOnce[A])(p: (A) ⇒ Boolean)(orElse: ⇒ A): A
- final def flatCollect[A, B](elems: List[A])(pf: PartialFunction[A, Traversable[B]]): List[B]
- final def flatMap2[A, B, C](xs1: List[A], xs2: List[B])(f: (A, B) ⇒ List[C]): List[C]
-
final
def
flattensToEmpty(xss: Seq[Seq[_]]): Boolean
- Annotations
- @tailrec()
- final def foldLeft2[A1, A2, B](xs1: List[A1], xs2: List[A2])(z0: B)(f: (B, A1, A2) ⇒ B): B
- final def forall3[A, B, C](xs1: List[A], xs2: List[B], xs3: List[C])(f: (A, B, C) ⇒ Boolean): Boolean
- final def foreach2[A, B](xs1: List[A], xs2: List[B])(f: (A, B) ⇒ Unit): Unit
- final def foreach3[A, B, C](xs1: List[A], xs2: List[B], xs3: List[C])(f: (A, B, C) ⇒ Unit): Unit
- final def foreachWithIndex[A](xs: List[A])(f: (A, Int) ⇒ Unit): Unit
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
hasLength(xs: List[_], len: Int): Boolean
Again avoiding calling length, but the lengthCompare interface is clunky.
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def linkedMapFrom[A, A1 >: A, B](xs: List[A])(f: (A) ⇒ B): LinkedHashMap[A1, B]
- final def map2[A, B, C](xs1: List[A], xs2: List[B])(f: (A, B) ⇒ C): List[C]
-
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 functionf
maps all elements to themselves. - final def map3[A, B, C, D](xs1: List[A], xs2: List[B], xs3: List[C])(f: (A, B, C) ⇒ D): List[D]
- final def mapFilter2[A, B, C](itA: Iterator[A], itB: Iterator[B])(f: (A, B) ⇒ Option[C]): Iterator[C]
- final def mapFrom[A, A1 >: A, B](xs: List[A])(f: (A) ⇒ B): Map[A1, B]
-
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 - final def mapWithIndex[A, B](xs: List[A])(f: (A, Int) ⇒ B): List[B]
-
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.
- final def mfind[A](xss: List[List[A]])(p: (A) ⇒ Boolean): Option[A]
- final def mforall[A](xss: List[List[A]])(p: (A) ⇒ Boolean): Boolean
- final def mforeach[A](xss: Traversable[Traversable[A]])(f: (A) ⇒ Unit): Unit
-
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.
- final def mmap[A, B](xss: List[List[A]])(f: (A) ⇒ B): collection.immutable.List[collection.immutable.List[B]]
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def sameElementsEquals(thiss: List[AnyRef], that: List[AnyRef]): Boolean
-
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.
- final def sequence[A](as: List[Option[A]]): Option[List[A]]
- final def sequenceOpt[A](as: List[Option[A]]): Option[List[A]]
-
final
def
sumSize(xss: List[List[_]], acc: Int): Int
- Annotations
- @tailrec()
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
- final def transposeSafe[A](ass: List[List[A]]): Option[List[List[A]]]
- final def traverseOpt[A, B](as: List[A])(f: (A) ⇒ Option[B]): Option[List[B]]
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()