Scala Standard Library 2.13.1 - scala.collection.mutable.Buffer (original) (raw)
trait Buffer[A] extends Seq[A] with SeqOps[A, Buffer, Buffer[A]] with Growable[A] with Shrinkable[A] with IterableFactoryDefaults[A, Buffer]
Ordering
- Alphabetic
- By Inheritance
Inherited
- Buffer
- Shrinkable
- Growable
- Clearable
- Seq
- SeqOps
- Cloneable
- Cloneable
- Seq
- Equals
- SeqOps
- PartialFunction
- Function1
- Iterable
- 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
Abstract Value Members
- abstract def addOne(elem: A): Buffer.this.type
- abstract def apply(i: Int): A
- abstract def clear(): Unit
- abstract def insert(idx: Int, elem: A): Unit
- abstract def insertAll(idx: Int, elems: IterableOnce[A]): Unit
- abstract def iterator: Iterator[A]
- abstract def length: Int
- abstract def patchInPlace(from: Int, patch: IterableOnce[A], replaced: Int): Buffer.this.type
- abstract def prepend(elem: A): Buffer.this.type
- abstract def remove(idx: Int, count: Int): Unit
- abstract def remove(idx: Int): A
- abstract def update(idx: Int, elem: A): Unit
Concrete Value Members
- final def !=(arg0: Any): Boolean
- final def ##(): Int
- def +(other: String): String
- final def ++[B >: A](suffix: IterableOnce[B]): Buffer[B]
- final def ++:[B >: A](prefix: IterableOnce[B]): Buffer[B]
- final def ++=(xs: IterableOnce[A]): Buffer.this.type
- final def ++=:(elems: IterableOnce[A]): Buffer.this.type
- final def +:[B >: A](elem: B): Buffer[B]
- final def +=(elem: A): Buffer.this.type
- final def +=:(elem: A): Buffer.this.type
- final def --=(xs: IterableOnce[A]): Buffer.this.type
- def -=(elem1: A, elem2: A, elems: A*): Buffer.this.type
- final def -=(elem: A): Buffer.this.type
- def ->[B](y: B): (Buffer[A], B)
- final def :+[B >: A](elem: B): Buffer[B]
- final def :++[B >: A](suffix: IterableOnce[B]): Buffer[B]
- final def ==(arg0: Any): Boolean
- def addAll(xs: IterableOnce[A]): Buffer.this.type
- final def addString(b: StringBuilder): StringBuilder
- final def addString(b: StringBuilder, sep: String): StringBuilder
- def addString(b: StringBuilder, start: String, sep: String, end: String): StringBuilder
- def andThen[C](k: PartialFunction[A, C]): PartialFunction[Int, C]
- def andThen[C](k: (A) => C): PartialFunction[Int, C]
- final def append(elem: A): Buffer.this.type
- final def appendAll(xs: IterableOnce[A]): Buffer.this.type
- def appended[B >: A](elem: B): Buffer[B]
- def appendedAll[B >: A](suffix: IterableOnce[B]): Buffer[B]
- 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(): Buffer[A]
- final def coll: Buffer.this.type
- def collect[B](pf: PartialFunction[A, B]): Buffer[B]
- def collectFirst[B](pf: PartialFunction[A, B]): Option[B]
- def combinations(n: Int): Iterator[Buffer[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]): Buffer[B]
- 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]): Buffer[A]
- def distinct: Buffer[A]
- def distinctBy[B](f: (A) => B): Buffer[A]
- def drop(n: Int): Buffer[A]
- def dropInPlace(n: Int): Buffer.this.type
- def dropRight(n: Int): Buffer[A]
- def dropRightInPlace(n: Int): Buffer.this.type
- def dropWhile(p: (A) => Boolean): Buffer[A]
- def dropWhileInPlace(p: (A) => Boolean): Buffer.this.type
- def elementWise: ElementWiseExtractor[Int, A]
- def empty: Buffer[A]
- def endsWith[B >: A](that: collection.Iterable[B]): Boolean
- def ensuring(cond: (Buffer[A]) => Boolean, msg: => Any): Buffer[A]
- def ensuring(cond: (Buffer[A]) => Boolean): Buffer[A]
- def ensuring(cond: Boolean, msg: => Any): Buffer[A]
- def ensuring(cond: Boolean): Buffer[A]
- final def eq(arg0: AnyRef): Boolean
- def equals(o: Any): Boolean
- def exists(p: (A) => Boolean): Boolean
- def filter(pred: (A) => Boolean): Buffer[A]
- def filterNot(pred: (A) => Boolean): Buffer[A]
- def finalize(): Unit
- def find(p: (A) => Boolean): Option[A]
- def findLast(p: (A) => Boolean): Option[A]
- def flatMap[B](f: (A) => IterableOnce[B]): Buffer[B]
- def flatten[B](implicit asIterable: (A) => IterableOnce[B]): Buffer[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(p: (A) => Boolean): Boolean
- def foreach[U](f: (A) => U): Unit
- def formatted(fmtstr: String): String
- def fromSpecific(coll: IterableOnce[A]): Buffer[A]
- final def getClass(): Class[_ <: AnyRef]
- def groupBy[K](f: (A) => K): immutable.Map[K, Buffer[A]]
- def groupMap[K, B](key: (A) => K)(f: (A) => B): immutable.Map[K, Buffer[B]]
- def groupMapReduce[K, B](key: (A) => K)(f: (A) => B)(reduce: (B, B) => B): immutable.Map[K, B]
- def grouped(size: Int): Iterator[Buffer[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): Int
- def indexWhere(p: (A) => Boolean, from: Int): Int
- def indices: immutable.Range
- def init: Buffer[A]
- def inits: Iterator[Buffer[A]]
- def intersect[B >: A](that: collection.Seq[B]): Buffer[A]
- def isDefinedAt(idx: Int): Boolean
- def isEmpty: Boolean
- final def isInstanceOf[T0]: Boolean
- def isTraversableAgain: Boolean
- def iterableFactory: SeqFactory[Buffer]
- 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): Int
- def lastIndexWhere(p: (A) => Boolean, end: Int): Int
- def lastOption: Option[A]
- def lazyZip[B](that: collection.Iterable[B]): LazyZip2[A, B, Buffer.this.type]
- def lengthCompare(that: collection.Iterable[_]): Int
- def lengthCompare(len: Int): Int
- final def lengthIs: SizeCompareOps
- def lift: (Int) => Option[A]
- def map[B](f: (A) => B): Buffer[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, Buffer[A]]
- def nonEmpty: Boolean
- final def notify(): Unit
- final def notifyAll(): Unit
- def occCounts[B](sq: collection.Seq[B]): Map[B, Int]
- def orElse[A1 <: Int, B1 >: A](that: PartialFunction[A1, B1]): PartialFunction[A1, B1]
- def padTo[B >: A](len: Int, elem: B): Buffer[B]
- def padToInPlace(len: Int, elem: A): Buffer.this.type
- def partition(p: (A) => Boolean): (Buffer[A], Buffer[A])
- def partitionMap[A1, A2](f: (A) => Either[A1, A2]): (Buffer[A1], Buffer[A2])
- def patch[B >: A](from: Int, other: IterableOnce[B], replaced: Int): Buffer[B]
- def permutations: Iterator[Buffer[A]]
- def prependAll(elems: IterableOnce[A]): Buffer.this.type
- def prepended[B >: A](elem: B): Buffer[B]
- def prependedAll[B >: A](prefix: IterableOnce[B]): Buffer[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]
- def reverse: Buffer[A]
- def reverseIterator: Iterator[A]
- 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): Buffer[B]
- def scanLeft[B](z: B)(op: (B, A) => B): Buffer[B]
- def scanRight[B](z: B)(op: (A, B) => B): Buffer[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): Buffer[A]
- def sliceInPlace(start: Int, end: Int): Buffer.this.type
- def sliding(size: Int, step: Int): Iterator[Buffer[A]]
- def sliding(size: Int): Iterator[Buffer[A]]
- def sortBy[B](f: (A) => B)(implicit ord: Ordering[B]): Buffer[A]
- def sortWith(lt: (A, A) => Boolean): Buffer[A]
- def sorted[B >: A](implicit ord: Ordering[B]): Buffer[A]
- def span(p: (A) => Boolean): (Buffer[A], Buffer[A])
- def splitAt(n: Int): (Buffer[A], Buffer[A])
- def startsWith[B >: A](that: IterableOnce[B], offset: Int = 0): Boolean
- def stepper[S <: Stepper[_]](implicit shape: StepperShape[A, S]): S
- def stringPrefix: String
- def subtractAll(xs: IterableOnce[A]): Buffer.this.type
- def subtractOne(x: A): Buffer.this.type
- def sum[B >: A](implicit num: math.Numeric[B]): B
- final def synchronized[T0](arg0: => T0): T0
- def tail: Buffer[A]
- def tails: Iterator[Buffer[A]]
- def take(n: Int): Buffer[A]
- def takeInPlace(n: Int): Buffer.this.type
- def takeRight(n: Int): Buffer[A]
- def takeRightInPlace(n: Int): Buffer.this.type
- def takeWhile(p: (A) => Boolean): Buffer[A]
- def takeWhileInPlace(p: (A) => Boolean): Buffer.this.type
- def tapEach[U](f: (A) => U): Buffer[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: immutable.IndexedSeq[A]
- final def toIterable: Buffer.this.type
- def toList: immutable.List[A]
- def toMap[K, V](implicit ev: <:<[A, (K, V)]): immutable.Map[K, V]
- def toSeq: immutable.Seq[A]
- def toSet[B >: A]: immutable.Set[B]
- def toString(): String
- def toVector: immutable.Vector[A]
- def transpose[B](implicit asIterable: (A) => collection.Iterable[B]): Buffer[Buffer[B]]
- def trimEnd(n: Int): Unit
- def trimStart(n: Int): Unit
- def unapply(a: Int): Option[A]
- def unlift: PartialFunction[Int, B]
- def unzip[A1, A2](implicit asPair: (A) => (A1, A2)): (Buffer[A1], Buffer[A2])
- def unzip3[A1, A2, A3](implicit asTriple: (A) => (A1, A2, A3)): (Buffer[A1], Buffer[A2], Buffer[A3])
- def updated[B >: A](index: Int, elem: B): Buffer[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, [_]Buffer[_]]
- def zip[B](that: IterableOnce[B]): Buffer[(A, B)]
- def zipAll[A1 >: A, B](that: collection.Iterable[B], thisElem: A1, thatElem: B): Buffer[(A1, B)]
- def zipWithIndex: Buffer[(A, Int)]
Deprecated Value Members
- final def +=(elem1: A, elem2: A, elems: A*): Buffer.this.type
- 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
- final def append(elems: A*): Buffer.this.type
- def collectFirst[B](f: PartialFunction[A, B]): Option[B]
- def companion: IterableFactory[[_]Buffer[_]]
- 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
- final def prepend(elems: A*): Buffer.this.type
- 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: Buffer[A]
- def reverseMap[B](f: (A) => B): Buffer[B]
- def sameElements[B >: A](that: IterableOnce[B]): Boolean
- def seq: Buffer.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: immutable.List[A]
- def toMap[K, V](implicit ev: <:<[A, (K, V)]): immutable.Map[K, V]
- def toSeq: immutable.Seq[A]
- def toSet[B >: A]: immutable.Set[B]
- def toStream: immutable.Stream[A]
- final def toStream: immutable.Stream[A]
- final def toTraversable: collection.Traversable[A]
- final def toTraversable: collection.Traversable[A]
- def toVector: immutable.Vector[A]
- final def transform(f: (A) => A): Buffer.this.type
- final def union[B >: A](that: collection.Seq[B]): Buffer[B]
- def view(from: Int, until: Int): View[A]
- def withFilter(f: (A) => Boolean): Iterator[A]
- def →[B](y: B): (Buffer[A], B)