Scala Standard Library 2.13.1 - scala.collection.immutable.List (original) (raw)

sealed abstract class List[+A] extends AbstractSeq[A] with LinearSeq[A] with LinearSeqOps[A, List, List[A]] with StrictOptimizedLinearSeqOps[A, List, List[A]] with StrictOptimizedSeqOps[A, List, List[A]] with IterableFactoryDefaults[A, List] with DefaultSerializable

Ordering

  1. Alphabetic
  2. By Inheritance

Inherited

  1. List
  2. DefaultSerializable
  3. Serializable
  4. StrictOptimizedSeqOps
  5. StrictOptimizedLinearSeqOps
  6. StrictOptimizedSeqOps
  7. StrictOptimizedIterableOps
  8. LinearSeq
  9. LinearSeqOps
  10. LinearSeq
  11. LinearSeqOps
  12. AbstractSeq
  13. Seq
  14. SeqOps
  15. Iterable
  16. AbstractSeq
  17. Seq
  18. Equals
  19. SeqOps
  20. PartialFunction
  21. Function1
  22. AbstractIterable
  23. Iterable
  24. IterableFactoryDefaults
  25. IterableOps
  26. IterableOnceOps
  27. IterableOnce
  28. AnyRef
  29. Any

Implicitly

  1. by UnliftOps

  2. by iterableOnceExtensionMethods

  3. by any2stringadd

  4. by StringFormat

  5. by Ensuring

  6. by ArrowAssoc

  7. Hide All

  8. Show All

Visibility

  1. Public
  2. Protected

Value Members

  1. final def !=(arg0: Any): Boolean
  2. final def ##(): Int
  3. def +(other: String): String
  4. final def ++[B >: A](suffix: IterableOnce[B]): List[B]
  5. final def ++:[B >: A](prefix: IterableOnce[B]): List[B]
  6. final def +:[B >: A](elem: B): List[B]
  7. def ->[B](y: B): (List[A], B)
  8. final def :+[B >: A](elem: B): List[B]
  9. final def :++[B >: A](suffix: IterableOnce[B]): List[B]
  10. def ::[B >: A](elem: B): List[B]
  11. def :::[B >: A](prefix: List[B]): List[B]
  12. final def ==(arg0: Any): Boolean
  13. final def addString(b: mutable.StringBuilder): mutable.StringBuilder
  14. final def addString(b: mutable.StringBuilder, sep: String): mutable.StringBuilder
  15. def addString(b: mutable.StringBuilder, start: String, sep: String, end: String): mutable.StringBuilder
  16. def andThen[C](k: PartialFunction[A, C]): PartialFunction[Int, C]
  17. def andThen[C](k: (A) => C): PartialFunction[Int, C]
  18. def appended[B >: A](elem: B): List[B]
  19. def appendedAll[B >: A](suffix: IterableOnce[B]): List[B]
  20. def apply(n: Int): A
  21. def applyOrElse[A1 <: Int, B1 >: A](x: A1, default: (A1) => B1): B1
  22. final def asInstanceOf[T0]: T0
  23. def canEqual(that: Any): Boolean
  24. def className: String
  25. def clone(): AnyRef
  26. final def coll: List.this.type
  27. final def collect[B](pf: PartialFunction[A, B]): List[B]
  28. def collectFirst[B](pf: PartialFunction[A, B]): Option[B]
  29. def combinations(n: Int): Iterator[List[A]]
  30. def compose[R](k: PartialFunction[R, Int]): PartialFunction[R, A]
  31. def compose[A](g: (A) => Int): (A) => A
  32. final def concat[B >: A](suffix: IterableOnce[B]): List[B]
  33. final def contains[A1 >: A](elem: A1): Boolean
  34. def containsSlice[B](that: collection.Seq[B]): Boolean
  35. def copyToArray[B >: A](xs: Array[B], start: Int, len: Int): Int
  36. def copyToArray[B >: A](xs: Array[B], start: Int): Int
  37. def copyToArray[B >: A](xs: Array[B]): Int
  38. def corresponds[B](that: collection.Seq[B])(p: (A, B) => Boolean): Boolean
  39. def corresponds[B](that: IterableOnce[B])(p: (A, B) => Boolean): Boolean
  40. def count(p: (A) => Boolean): Int
  41. def diff[B >: A](that: collection.Seq[B]): List[A]
  42. def distinct: List[A]
  43. def distinctBy[B](f: (A) => B): List[A]
  44. def drop(n: Int): List[A]
  45. def dropRight(n: Int): List[A]
  46. def dropWhile(p: (A) => Boolean): List[A]
  47. def elementWise: ElementWiseExtractor[Int, A]
  48. def empty: List[A]
  49. def endsWith[B >: A](that: collection.Iterable[B]): Boolean
  50. def ensuring(cond: (List[A]) => Boolean, msg: => Any): List[A]
  51. def ensuring(cond: (List[A]) => Boolean): List[A]
  52. def ensuring(cond: Boolean, msg: => Any): List[A]
  53. def ensuring(cond: Boolean): List[A]
  54. final def eq(arg0: AnyRef): Boolean
  55. def equals(o: Any): Boolean
  56. final def exists(p: (A) => Boolean): Boolean
  57. def filter(p: (A) => Boolean): List[A]
  58. def filterImpl(pred: (A) => Boolean, isFlipped: Boolean): List[A]
  59. def filterNot(p: (A) => Boolean): List[A]
  60. def finalize(): Unit
  61. final def find(p: (A) => Boolean): Option[A]
  62. def findLast(p: (A) => Boolean): Option[A]
  63. final def flatMap[B](f: (A) => IterableOnce[B]): List[B]
  64. def flatten[B](implicit toIterableOnce: (A) => IterableOnce[B]): List[B]
  65. def fold[A1 >: A](z: A1)(op: (A1, A1) => A1): A1
  66. def foldLeft[B](z: B)(op: (B, A) => B): B
  67. final def foldRight[B](z: B)(op: (A, B) => B): B
  68. final def forall(p: (A) => Boolean): Boolean
  69. final def foreach[U](f: (A) => U): Unit
  70. def formatted(fmtstr: String): String
  71. def fromSpecific(coll: IterableOnce[A]): List[A]
  72. final def getClass(): Class[_ <: AnyRef]
  73. def groupBy[K](f: (A) => K): Map[K, List[A]]
  74. def groupMap[K, B](key: (A) => K)(f: (A) => B): Map[K, List[B]]
  75. def groupMapReduce[K, B](key: (A) => K)(f: (A) => B)(reduce: (B, B) => B): Map[K, B]
  76. def grouped(size: Int): Iterator[List[A]]
  77. def hashCode(): Int
  78. def head: A
  79. def headOption: Option[A]
  80. def indexOf[B >: A](elem: B): Int
  81. def indexOf[B >: A](elem: B, from: Int): Int
  82. def indexOfSlice[B >: A](that: collection.Seq[B]): Int
  83. def indexOfSlice[B >: A](that: collection.Seq[B], from: Int): Int
  84. def indexWhere(p: (A) => Boolean, from: Int): Int
  85. def indexWhere(p: (A) => Boolean): Int
  86. def indices: Range
  87. def init: List[A]
  88. def inits: Iterator[List[A]]
  89. def intersect[B >: A](that: collection.Seq[B]): List[A]
  90. def isDefinedAt(x: Int): Boolean
  91. final def isEmpty: Boolean
  92. final def isInstanceOf[T0]: Boolean
  93. def isTraversableAgain: Boolean
  94. def iterableFactory: SeqFactory[List]
  95. def iterator: Iterator[A]
  96. def knownSize: Int
  97. def last: A
  98. def lastIndexOf[B >: A](elem: B, end: Int = length - 1): Int
  99. def lastIndexOfSlice[B >: A](that: collection.Seq[B]): Int
  100. def lastIndexOfSlice[B >: A](that: collection.Seq[B], end: Int): Int
  101. def lastIndexWhere(p: (A) => Boolean, end: Int): Int
  102. def lastIndexWhere(p: (A) => Boolean): Int
  103. def lastOption: Option[A]
  104. def lazyZip[B](that: collection.Iterable[B]): LazyZip2[A, B, List.this.type]
  105. final def length: Int
  106. final def lengthCompare(len: Int): Int
  107. def lengthCompare(that: collection.Iterable[_]): Int
  108. final def lengthIs: SizeCompareOps
  109. def lift: (Int) => Option[A]
  110. final def map[B](f: (A) => B): List[B]
  111. final def mapConserve[B >: A <: AnyRef](f: (A) => B): List[B]
  112. def max[B >: A](implicit ord: math.Ordering[B]): A
  113. def maxBy[B](f: (A) => B)(implicit cmp: math.Ordering[B]): A
  114. def maxByOption[B](f: (A) => B)(implicit cmp: math.Ordering[B]): Option[A]
  115. def maxOption[B >: A](implicit ord: math.Ordering[B]): Option[A]
  116. def min[B >: A](implicit ord: math.Ordering[B]): A
  117. def minBy[B](f: (A) => B)(implicit cmp: math.Ordering[B]): A
  118. def minByOption[B](f: (A) => B)(implicit cmp: math.Ordering[B]): Option[A]
  119. def minOption[B >: A](implicit ord: math.Ordering[B]): Option[A]
  120. final def mkString: String
  121. final def mkString(sep: String): String
  122. final def mkString(start: String, sep: String, end: String): String
  123. final def ne(arg0: AnyRef): Boolean
  124. def newSpecificBuilder: Builder[A, List[A]]
  125. def nonEmpty: Boolean
  126. final def notify(): Unit
  127. final def notifyAll(): Unit
  128. def occCounts[B](sq: collection.Seq[B]): mutable.Map[B, Int]
  129. def orElse[A1 <: Int, B1 >: A](that: PartialFunction[A1, B1]): PartialFunction[A1, B1]
  130. def padTo[B >: A](len: Int, elem: B): List[B]
  131. def partition(p: (A) => Boolean): (List[A], List[A])
  132. def partitionMap[A1, A2](f: (A) => Either[A1, A2]): (List[A1], List[A2])
  133. def patch[B >: A](from: Int, other: IterableOnce[B], replaced: Int): List[B]
  134. def permutations: Iterator[List[A]]
  135. def prepended[B >: A](elem: B): List[B]
  136. def prependedAll[B >: A](prefix: IterableOnce[B]): List[B]
  137. def product[B >: A](implicit num: math.Numeric[B]): B
  138. def reduce[B >: A](op: (B, B) => B): B
  139. def reduceLeft[B >: A](op: (B, A) => B): B
  140. def reduceLeftOption[B >: A](op: (B, A) => B): Option[B]
  141. def reduceOption[B >: A](op: (B, B) => B): Option[B]
  142. def reduceRight[B >: A](op: (A, B) => B): B
  143. def reduceRightOption[B >: A](op: (A, B) => B): Option[B]
  144. final def reverse: List[A]
  145. def reverseIterator: Iterator[A]
  146. def reverse_:::[B >: A](prefix: List[B]): List[B]
  147. def reversed: collection.Iterable[A]
  148. def runWith[U](action: (A) => U): (Int) => Boolean
  149. def sameElements[B >: A](that: IterableOnce[B]): Boolean
  150. def scan[B >: A](z: B)(op: (B, B) => B): List[B]
  151. def scanLeft[B](z: B)(op: (B, A) => B): List[B]
  152. def scanRight[B](z: B)(op: (A, B) => B): List[B]
  153. def search[B >: A](elem: B, from: Int, to: Int)(implicit ord: Ordering[B]): SearchResult
  154. def search[B >: A](elem: B)(implicit ord: Ordering[B]): SearchResult
  155. def segmentLength(p: (A) => Boolean, from: Int): Int
  156. final def segmentLength(p: (A) => Boolean): Int
  157. final def size: Int
  158. final def sizeCompare(that: collection.Iterable[_]): Int
  159. final def sizeCompare(otherSize: Int): Int
  160. final def sizeIs: SizeCompareOps
  161. def slice(from: Int, until: Int): List[A]
  162. def sliding(size: Int, step: Int): Iterator[List[A]]
  163. def sliding(size: Int): Iterator[List[A]]
  164. def sortBy[B](f: (A) => B)(implicit ord: Ordering[B]): List[A]
  165. def sortWith(lt: (A, A) => Boolean): List[A]
  166. def sorted[B >: A](implicit ord: Ordering[B]): List[A]
  167. final def span(p: (A) => Boolean): (List[A], List[A])
  168. def splitAt(n: Int): (List[A], List[A])
  169. def startsWith[B >: A](that: IterableOnce[B], offset: Int = 0): Boolean
  170. def stepper[S <: Stepper[_]](implicit shape: StepperShape[A, S]): S
  171. final def strictOptimizedCollect[B, C2](b: Builder[B, C2], pf: PartialFunction[A, B]): C2
  172. final def strictOptimizedConcat[B >: A, C2](that: IterableOnce[B], b: Builder[B, C2]): C2
  173. final def strictOptimizedFlatMap[B, C2](b: Builder[B, C2], f: (A) => IterableOnce[B]): C2
  174. final def strictOptimizedFlatten[B, C2](b: Builder[B, C2])(implicit toIterableOnce: (A) => IterableOnce[B]): C2
  175. final def strictOptimizedMap[B, C2](b: Builder[B, C2], f: (A) => B): C2
  176. final def strictOptimizedZip[B, C2](that: IterableOnce[B], b: Builder[(A, B), C2]): C2
  177. def stringPrefix: String
  178. def sum[B >: A](implicit num: math.Numeric[B]): B
  179. final def synchronized[T0](arg0: => T0): T0
  180. def tail: List[A]
  181. def tails: Iterator[List[A]]
  182. def take(n: Int): List[A]
  183. def takeRight(n: Int): List[A]
  184. final def takeWhile(p: (A) => Boolean): List[A]
  185. def tapEach[U](f: (A) => U): List[A]
  186. def to[C1](factory: Factory[A, C1]): C1
  187. def toArray[B >: A](implicit arg0: ClassTag[B]): Array[B]
  188. final def toBuffer[B >: A]: Buffer[B]
  189. def toIndexedSeq: IndexedSeq[A]
  190. final def toIterable: List.this.type
  191. final def toList: List[A]
  192. def toMap[K, V](implicit ev: <:<[A, (K, V)]): Map[K, V]
  193. final def toSeq: List.this.type
  194. def toSet[B >: A]: Set[B]
  195. def toString(): String
  196. def toVector: Vector[A]
  197. def transpose[B](implicit asIterable: (A) => collection.Iterable[B]): List[List[B]]
  198. def unapply(a: Int): Option[A]
  199. def unlift: PartialFunction[Int, B]
  200. def unzip[A1, A2](implicit asPair: (A) => (A1, A2)): (List[A1], List[A2])
  201. def unzip3[A1, A2, A3](implicit asTriple: (A) => (A1, A2, A3)): (List[A1], List[A2], List[A3])
  202. def updated[B >: A](index: Int, elem: B): List[B]
  203. def view: SeqView[A]
  204. final def wait(): Unit
  205. final def wait(arg0: Long, arg1: Int): Unit
  206. final def wait(arg0: Long): Unit
  207. def withFilter(p: (A) => Boolean): WithFilter[A, [_]List[_]]
  208. def writeReplace(): AnyRef
  209. def zip[B](that: IterableOnce[B]): List[(A, B)]
  210. def zipAll[A1 >: A, B](that: collection.Iterable[B], thisElem: A1, thatElem: B): List[(A1, B)]
  211. def zipWithIndex: List[(A, Int)]

Deprecated Value Members

  1. def /:[B](z: B)(op: (B, A) => B): B
  2. final def /:[B](z: B)(op: (B, A) => B): B
  3. def :\[B](z: B)(op: (A, B) => B): B
  4. final def :\[B](z: B)(op: (A, B) => B): B
  5. def aggregate[B](z: => B)(seqop: (B, A) => B, combop: (B, B) => B): B
  6. def collectFirst[B](f: PartialFunction[A, B]): Option[B]
  7. def companion: IterableFactory[[_]List[_]]
  8. def copyToBuffer(dest: Buffer[A]): Unit
  9. final def copyToBuffer[B >: A](dest: Buffer[B]): Unit
  10. def count(f: (A) => Boolean): Int
  11. def exists(f: (A) => Boolean): Boolean
  12. def filter(f: (A) => Boolean): Iterator[A]
  13. def find(p: (A) => Boolean): Option[A]
  14. def flatMap[B](f: (A) => IterableOnce[B]): IterableOnce[B]
  15. def fold[A1 >: A](z: A1)(op: (A1, A1) => A1): A1
  16. def foldLeft[B](z: B)(op: (B, A) => B): B
  17. def foldRight[B](z: B)(op: (A, B) => B): B
  18. def forall(f: (A) => Boolean): Boolean
  19. def foreach[U](f: (A) => U): Unit
  20. def hasDefiniteSize: Boolean
  21. def isEmpty: Boolean
  22. def map[B](f: (A) => B): IterableOnce[B]
  23. def max(implicit ord: math.Ordering[A]): A
  24. def maxBy[B](f: (A) => B)(implicit cmp: math.Ordering[B]): A
  25. def min(implicit ord: math.Ordering[A]): A
  26. def minBy[B](f: (A) => B)(implicit cmp: math.Ordering[B]): A
  27. def mkString: String
  28. def mkString(sep: String): String
  29. def mkString(start: String, sep: String, end: String): String
  30. def nonEmpty: Boolean
  31. final def prefixLength(p: (A) => Boolean): Int
  32. def product(implicit num: math.Numeric[A]): A
  33. def reduce(f: (A, A) => A): A
  34. def reduceLeft(f: (A, A) => A): A
  35. def reduceLeftOption(f: (A, A) => A): Option[A]
  36. def reduceOption(f: (A, A) => A): Option[A]
  37. def reduceRight(f: (A, A) => A): A
  38. def reduceRightOption(f: (A, A) => A): Option[A]
  39. final def repr: List[A]
  40. def reverseMap[B](f: (A) => B): List[B]
  41. def sameElements[B >: A](that: IterableOnce[B]): Boolean
  42. def seq: List.this.type
  43. def size: Int
  44. def sum(implicit num: math.Numeric[A]): A
  45. def to[C1](factory: Factory[A, C1]): C1
  46. def toArray[B >: A](implicit arg0: ClassTag[B]): Array[B]
  47. def toBuffer[B >: A]: Buffer[B]
  48. def toIndexedSeq: collection.IndexedSeq[A]
  49. final def toIterable: collection.Iterable[A]
  50. def toIterator: Iterator[A]
  51. final def toIterator: Iterator[A]
  52. def toList: List[A]
  53. def toMap[K, V](implicit ev: <:<[A, (K, V)]): Map[K, V]
  54. def toSeq: Seq[A]
  55. def toSet[B >: A]: Set[B]
  56. def toStream: Stream[A]
  57. final def toStream: Stream[A]
  58. final def toTraversable: collection.Traversable[A]
  59. final def toTraversable: collection.Traversable[A]
  60. def toVector: Vector[A]
  61. final def union[B >: A](that: collection.Seq[B]): List[B]
  62. def view(from: Int, until: Int): View[A]
  63. def withFilter(f: (A) => Boolean): Iterator[A]
  64. def →[B](y: B): (List[A], B)

Inherited from DefaultSerializable

Inherited from java.io.Serializable

Inherited from StrictOptimizedSeqOps[A, List, List[A]]

Inherited from StrictOptimizedLinearSeqOps[A, List, List[A]]

Inherited from collection.StrictOptimizedSeqOps[A, List, List[A]]

Inherited from StrictOptimizedIterableOps[A, List, List[A]]

Inherited from LinearSeq[A]

Inherited from LinearSeqOps[A, [X]List[X], List[A]]

Inherited from collection.LinearSeq[A]

Inherited from collection.LinearSeqOps[A, [X]List[X], List[A]]

Inherited from AbstractSeq[A]

Inherited from Seq[A]

Inherited from SeqOps[A, [_]List[_], List[A]]

Inherited from Iterable[A]

Inherited from collection.AbstractSeq[A]

Inherited from collection.Seq[A]

Inherited from Equals

Inherited from collection.SeqOps[A, [_]List[_], List[A]]

Inherited from PartialFunction[Int, A]

Inherited from (Int) => A

Inherited from AbstractIterable[A]

Inherited from collection.Iterable[A]

Inherited from IterableFactoryDefaults[A, [x]List[x]]

Inherited from IterableOps[A, [_]List[_], List[A]]

Inherited from IterableOnceOps[A, [_]List[_], List[A]]

Inherited from IterableOnce[A]

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion UnliftOps fromList[A] to UnliftOps[Int, B]

Inherited by implicit conversion iterableOnceExtensionMethods fromList[A] to IterableOnceExtensionMethods[A]

Inherited by implicit conversion any2stringadd fromList[A] to any2stringadd[List[A]]

Inherited by implicit conversion StringFormat fromList[A] to StringFormat[List[A]]

Inherited by implicit conversion Ensuring fromList[A] to Ensuring[List[A]]

Inherited by implicit conversion ArrowAssoc fromList[A] to ArrowAssoc[List[A]]

Ungrouped