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
- Alphabetic
- By Inheritance
Inherited
- List
- DefaultSerializable
- Serializable
- StrictOptimizedSeqOps
- StrictOptimizedLinearSeqOps
- StrictOptimizedSeqOps
- StrictOptimizedIterableOps
- LinearSeq
- LinearSeqOps
- LinearSeq
- LinearSeqOps
- AbstractSeq
- Seq
- SeqOps
- Iterable
- AbstractSeq
- Seq
- Equals
- SeqOps
- PartialFunction
- Function1
- AbstractIterable
- Iterable
- IterableFactoryDefaults
- IterableOps
- IterableOnceOps
- IterableOnce
- AnyRef
- Any
Implicitly
by UnliftOps
by iterableOnceExtensionMethods
by any2stringadd
by StringFormat
by Ensuring
by ArrowAssoc
Hide All
Show All
Visibility
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- final def ##(): Int
- def +(other: String): String
- final def ++[B >: A](suffix: IterableOnce[B]): List[B]
- final def ++:[B >: A](prefix: IterableOnce[B]): List[B]
- final def +:[B >: A](elem: B): List[B]
- def ->[B](y: B): (List[A], B)
- final def :+[B >: A](elem: B): List[B]
- final def :++[B >: A](suffix: IterableOnce[B]): List[B]
- def ::[B >: A](elem: B): List[B]
- def :::[B >: A](prefix: List[B]): List[B]
- final def ==(arg0: Any): Boolean
- final def addString(b: mutable.StringBuilder): mutable.StringBuilder
- final def addString(b: mutable.StringBuilder, sep: String): mutable.StringBuilder
- def addString(b: mutable.StringBuilder, start: String, sep: String, end: String): mutable.StringBuilder
- def andThen[C](k: PartialFunction[A, C]): PartialFunction[Int, C]
- def andThen[C](k: (A) => C): PartialFunction[Int, C]
- def appended[B >: A](elem: B): List[B]
- def appendedAll[B >: A](suffix: IterableOnce[B]): List[B]
- def apply(n: Int): A
- def applyOrElse[A1 <: Int, B1 >: A](x: A1, default: (A1) => B1): B1
- final def asInstanceOf[T0]: T0
- def canEqual(that: Any): Boolean
- def className: String
- def clone(): AnyRef
- final def coll: List.this.type
- final def collect[B](pf: PartialFunction[A, B]): List[B]
- def collectFirst[B](pf: PartialFunction[A, B]): Option[B]
- def combinations(n: Int): Iterator[List[A]]
- def compose[R](k: PartialFunction[R, Int]): PartialFunction[R, A]
- def compose[A](g: (A) => Int): (A) => A
- final def concat[B >: A](suffix: IterableOnce[B]): List[B]
- final def contains[A1 >: A](elem: A1): Boolean
- def containsSlice[B](that: collection.Seq[B]): Boolean
- def copyToArray[B >: A](xs: Array[B], start: Int, len: Int): Int
- def copyToArray[B >: A](xs: Array[B], start: Int): Int
- def copyToArray[B >: A](xs: Array[B]): Int
- def corresponds[B](that: collection.Seq[B])(p: (A, B) => Boolean): Boolean
- def corresponds[B](that: IterableOnce[B])(p: (A, B) => Boolean): Boolean
- def count(p: (A) => Boolean): Int
- def diff[B >: A](that: collection.Seq[B]): List[A]
- def distinct: List[A]
- def distinctBy[B](f: (A) => B): List[A]
- def drop(n: Int): List[A]
- def dropRight(n: Int): List[A]
- def dropWhile(p: (A) => Boolean): List[A]
- def elementWise: ElementWiseExtractor[Int, A]
- def empty: List[A]
- def endsWith[B >: A](that: collection.Iterable[B]): Boolean
- def ensuring(cond: (List[A]) => Boolean, msg: => Any): List[A]
- def ensuring(cond: (List[A]) => Boolean): List[A]
- def ensuring(cond: Boolean, msg: => Any): List[A]
- def ensuring(cond: Boolean): List[A]
- final def eq(arg0: AnyRef): Boolean
- def equals(o: Any): Boolean
- final def exists(p: (A) => Boolean): Boolean
- def filter(p: (A) => Boolean): List[A]
- def filterImpl(pred: (A) => Boolean, isFlipped: Boolean): List[A]
- def filterNot(p: (A) => Boolean): List[A]
- def finalize(): Unit
- final def find(p: (A) => Boolean): Option[A]
- def findLast(p: (A) => Boolean): Option[A]
- final def flatMap[B](f: (A) => IterableOnce[B]): List[B]
- def flatten[B](implicit toIterableOnce: (A) => IterableOnce[B]): List[B]
- def fold[A1 >: A](z: A1)(op: (A1, A1) => A1): A1
- def foldLeft[B](z: B)(op: (B, A) => B): B
- final def foldRight[B](z: B)(op: (A, B) => B): B
- final def forall(p: (A) => Boolean): Boolean
- final def foreach[U](f: (A) => U): Unit
- def formatted(fmtstr: String): String
- def fromSpecific(coll: IterableOnce[A]): List[A]
- final def getClass(): Class[_ <: AnyRef]
- def groupBy[K](f: (A) => K): Map[K, List[A]]
- def groupMap[K, B](key: (A) => K)(f: (A) => B): Map[K, List[B]]
- def groupMapReduce[K, B](key: (A) => K)(f: (A) => B)(reduce: (B, B) => B): Map[K, B]
- def grouped(size: Int): Iterator[List[A]]
- def hashCode(): Int
- def head: A
- def headOption: Option[A]
- def indexOf[B >: A](elem: B): Int
- def indexOf[B >: A](elem: B, from: Int): Int
- def indexOfSlice[B >: A](that: collection.Seq[B]): Int
- def indexOfSlice[B >: A](that: collection.Seq[B], from: Int): Int
- def indexWhere(p: (A) => Boolean, from: Int): Int
- def indexWhere(p: (A) => Boolean): Int
- def indices: Range
- def init: List[A]
- def inits: Iterator[List[A]]
- def intersect[B >: A](that: collection.Seq[B]): List[A]
- def isDefinedAt(x: Int): Boolean
- final def isEmpty: Boolean
- final def isInstanceOf[T0]: Boolean
- def isTraversableAgain: Boolean
- def iterableFactory: SeqFactory[List]
- def iterator: Iterator[A]
- def knownSize: Int
- def last: A
- def lastIndexOf[B >: A](elem: B, end: Int = length - 1): Int
- def lastIndexOfSlice[B >: A](that: collection.Seq[B]): Int
- def lastIndexOfSlice[B >: A](that: collection.Seq[B], end: Int): Int
- def lastIndexWhere(p: (A) => Boolean, end: Int): Int
- def lastIndexWhere(p: (A) => Boolean): Int
- def lastOption: Option[A]
- def lazyZip[B](that: collection.Iterable[B]): LazyZip2[A, B, List.this.type]
- final def length: Int
- final def lengthCompare(len: Int): Int
- def lengthCompare(that: collection.Iterable[_]): Int
- final def lengthIs: SizeCompareOps
- def lift: (Int) => Option[A]
- final def map[B](f: (A) => B): List[B]
- final def mapConserve[B >: A <: AnyRef](f: (A) => B): List[B]
- def max[B >: A](implicit ord: math.Ordering[B]): A
- def maxBy[B](f: (A) => B)(implicit cmp: math.Ordering[B]): A
- def maxByOption[B](f: (A) => B)(implicit cmp: math.Ordering[B]): Option[A]
- def maxOption[B >: A](implicit ord: math.Ordering[B]): Option[A]
- def min[B >: A](implicit ord: math.Ordering[B]): A
- def minBy[B](f: (A) => B)(implicit cmp: math.Ordering[B]): A
- def minByOption[B](f: (A) => B)(implicit cmp: math.Ordering[B]): Option[A]
- def minOption[B >: A](implicit ord: math.Ordering[B]): Option[A]
- final def mkString: String
- final def mkString(sep: String): String
- final def mkString(start: String, sep: String, end: String): String
- final def ne(arg0: AnyRef): Boolean
- def newSpecificBuilder: Builder[A, List[A]]
- def nonEmpty: Boolean
- final def notify(): Unit
- final def notifyAll(): Unit
- def occCounts[B](sq: collection.Seq[B]): mutable.Map[B, Int]
- def orElse[A1 <: Int, B1 >: A](that: PartialFunction[A1, B1]): PartialFunction[A1, B1]
- def padTo[B >: A](len: Int, elem: B): List[B]
- def partition(p: (A) => Boolean): (List[A], List[A])
- def partitionMap[A1, A2](f: (A) => Either[A1, A2]): (List[A1], List[A2])
- def patch[B >: A](from: Int, other: IterableOnce[B], replaced: Int): List[B]
- def permutations: Iterator[List[A]]
- def prepended[B >: A](elem: B): List[B]
- def prependedAll[B >: A](prefix: IterableOnce[B]): List[B]
- def product[B >: A](implicit num: math.Numeric[B]): B
- def reduce[B >: A](op: (B, B) => B): B
- def reduceLeft[B >: A](op: (B, A) => B): B
- def reduceLeftOption[B >: A](op: (B, A) => B): Option[B]
- def reduceOption[B >: A](op: (B, B) => B): Option[B]
- def reduceRight[B >: A](op: (A, B) => B): B
- def reduceRightOption[B >: A](op: (A, B) => B): Option[B]
- final def reverse: List[A]
- def reverseIterator: Iterator[A]
- def reverse_:::[B >: A](prefix: List[B]): List[B]
- def reversed: collection.Iterable[A]
- def runWith[U](action: (A) => U): (Int) => Boolean
- def sameElements[B >: A](that: IterableOnce[B]): Boolean
- def scan[B >: A](z: B)(op: (B, B) => B): List[B]
- def scanLeft[B](z: B)(op: (B, A) => B): List[B]
- def scanRight[B](z: B)(op: (A, B) => B): List[B]
- def search[B >: A](elem: B, from: Int, to: Int)(implicit ord: Ordering[B]): SearchResult
- def search[B >: A](elem: B)(implicit ord: Ordering[B]): SearchResult
- def segmentLength(p: (A) => Boolean, from: Int): Int
- final def segmentLength(p: (A) => Boolean): Int
- final def size: Int
- final def sizeCompare(that: collection.Iterable[_]): Int
- final def sizeCompare(otherSize: Int): Int
- final def sizeIs: SizeCompareOps
- def slice(from: Int, until: Int): List[A]
- def sliding(size: Int, step: Int): Iterator[List[A]]
- def sliding(size: Int): Iterator[List[A]]
- def sortBy[B](f: (A) => B)(implicit ord: Ordering[B]): List[A]
- def sortWith(lt: (A, A) => Boolean): List[A]
- def sorted[B >: A](implicit ord: Ordering[B]): List[A]
- final def span(p: (A) => Boolean): (List[A], List[A])
- def splitAt(n: Int): (List[A], List[A])
- def startsWith[B >: A](that: IterableOnce[B], offset: Int = 0): Boolean
- def stepper[S <: Stepper[_]](implicit shape: StepperShape[A, S]): S
- final def strictOptimizedCollect[B, C2](b: Builder[B, C2], pf: PartialFunction[A, B]): C2
- final def strictOptimizedConcat[B >: A, C2](that: IterableOnce[B], b: Builder[B, C2]): C2
- final def strictOptimizedFlatMap[B, C2](b: Builder[B, C2], f: (A) => IterableOnce[B]): C2
- final def strictOptimizedFlatten[B, C2](b: Builder[B, C2])(implicit toIterableOnce: (A) => IterableOnce[B]): C2
- final def strictOptimizedMap[B, C2](b: Builder[B, C2], f: (A) => B): C2
- final def strictOptimizedZip[B, C2](that: IterableOnce[B], b: Builder[(A, B), C2]): C2
- def stringPrefix: String
- def sum[B >: A](implicit num: math.Numeric[B]): B
- final def synchronized[T0](arg0: => T0): T0
- def tail: List[A]
- def tails: Iterator[List[A]]
- def take(n: Int): List[A]
- def takeRight(n: Int): List[A]
- final def takeWhile(p: (A) => Boolean): List[A]
- def tapEach[U](f: (A) => U): List[A]
- def to[C1](factory: Factory[A, C1]): C1
- def toArray[B >: A](implicit arg0: ClassTag[B]): Array[B]
- final def toBuffer[B >: A]: Buffer[B]
- def toIndexedSeq: IndexedSeq[A]
- final def toIterable: List.this.type
- final def toList: List[A]
- def toMap[K, V](implicit ev: <:<[A, (K, V)]): Map[K, V]
- final def toSeq: List.this.type
- def toSet[B >: A]: Set[B]
- def toString(): String
- def toVector: Vector[A]
- def transpose[B](implicit asIterable: (A) => collection.Iterable[B]): List[List[B]]
- def unapply(a: Int): Option[A]
- def unlift: PartialFunction[Int, B]
- def unzip[A1, A2](implicit asPair: (A) => (A1, A2)): (List[A1], List[A2])
- def unzip3[A1, A2, A3](implicit asTriple: (A) => (A1, A2, A3)): (List[A1], List[A2], List[A3])
- def updated[B >: A](index: Int, elem: B): List[B]
- def view: SeqView[A]
- final def wait(): Unit
- final def wait(arg0: Long, arg1: Int): Unit
- final def wait(arg0: Long): Unit
- def withFilter(p: (A) => Boolean): WithFilter[A, [_]List[_]]
- def writeReplace(): AnyRef
- def zip[B](that: IterableOnce[B]): List[(A, B)]
- def zipAll[A1 >: A, B](that: collection.Iterable[B], thisElem: A1, thatElem: B): List[(A1, B)]
- def zipWithIndex: List[(A, Int)]
Deprecated Value Members
- def /:[B](z: B)(op: (B, A) => B): B
- final def /:[B](z: B)(op: (B, A) => B): B
- def :\[B](z: B)(op: (A, B) => B): B
- final def :\[B](z: B)(op: (A, B) => B): B
- def aggregate[B](z: => B)(seqop: (B, A) => B, combop: (B, B) => B): B
- def collectFirst[B](f: PartialFunction[A, B]): Option[B]
- def companion: IterableFactory[[_]List[_]]
- def copyToBuffer(dest: Buffer[A]): Unit
- final def copyToBuffer[B >: A](dest: Buffer[B]): Unit
- def count(f: (A) => Boolean): Int
- def exists(f: (A) => Boolean): Boolean
- def filter(f: (A) => Boolean): Iterator[A]
- def find(p: (A) => Boolean): Option[A]
- def flatMap[B](f: (A) => IterableOnce[B]): IterableOnce[B]
- def fold[A1 >: A](z: A1)(op: (A1, A1) => A1): A1
- def foldLeft[B](z: B)(op: (B, A) => B): B
- def foldRight[B](z: B)(op: (A, B) => B): B
- def forall(f: (A) => Boolean): Boolean
- def foreach[U](f: (A) => U): Unit
- def hasDefiniteSize: Boolean
- def isEmpty: Boolean
- def map[B](f: (A) => B): IterableOnce[B]
- def max(implicit ord: math.Ordering[A]): A
- def maxBy[B](f: (A) => B)(implicit cmp: math.Ordering[B]): A
- def min(implicit ord: math.Ordering[A]): A
- def minBy[B](f: (A) => B)(implicit cmp: math.Ordering[B]): A
- def mkString: String
- def mkString(sep: String): String
- def mkString(start: String, sep: String, end: String): String
- def nonEmpty: Boolean
- final def prefixLength(p: (A) => Boolean): Int
- def product(implicit num: math.Numeric[A]): A
- def reduce(f: (A, A) => A): A
- def reduceLeft(f: (A, A) => A): A
- def reduceLeftOption(f: (A, A) => A): Option[A]
- def reduceOption(f: (A, A) => A): Option[A]
- def reduceRight(f: (A, A) => A): A
- def reduceRightOption(f: (A, A) => A): Option[A]
- final def repr: List[A]
- def reverseMap[B](f: (A) => B): List[B]
- def sameElements[B >: A](that: IterableOnce[B]): Boolean
- def seq: List.this.type
- def size: Int
- def sum(implicit num: math.Numeric[A]): A
- def to[C1](factory: Factory[A, C1]): C1
- def toArray[B >: A](implicit arg0: ClassTag[B]): Array[B]
- def toBuffer[B >: A]: Buffer[B]
- def toIndexedSeq: collection.IndexedSeq[A]
- final def toIterable: collection.Iterable[A]
- def toIterator: Iterator[A]
- final def toIterator: Iterator[A]
- def toList: List[A]
- def toMap[K, V](implicit ev: <:<[A, (K, V)]): Map[K, V]
- def toSeq: Seq[A]
- def toSet[B >: A]: Set[B]
- def toStream: Stream[A]
- final def toStream: Stream[A]
- final def toTraversable: collection.Traversable[A]
- final def toTraversable: collection.Traversable[A]
- def toVector: Vector[A]
- final def union[B >: A](that: collection.Seq[B]): List[B]
- def view(from: Int, until: Int): View[A]
- def withFilter(f: (A) => Boolean): Iterator[A]
- def →[B](y: B): (List[A], B)