Scala Standard Library 2.13.15 - 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

  1. Alphabetic
  2. By Inheritance

Inherited

  1. Buffer
  2. Shrinkable
  3. Growable
  4. Clearable
  5. Seq
  6. SeqOps
  7. Cloneable
  8. Cloneable
  9. Seq
  10. Equals
  11. SeqOps
  12. PartialFunction
  13. Function1
  14. Iterable
  15. Iterable
  16. IterableFactoryDefaults
  17. IterableOps
  18. IterableOnceOps
  19. IterableOnce
  20. AnyRef
  21. 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

Abstract Value Members

  1. abstract def addOne(elem: A): Buffer.this.type
  2. abstract def apply(i: Int): A
  3. abstract def clear(): Unit
  4. abstract def insert(idx: Int, elem: A): Unit
  5. abstract def insertAll(idx: Int, elems: IterableOnce[A]): Unit
  6. abstract def iterator: Iterator[A]
  7. abstract def length: Int
  8. abstract def patchInPlace(from: Int, patch: IterableOnce[A], replaced: Int): Buffer.this.type
  9. abstract def prepend(elem: A): Buffer.this.type
  10. abstract def remove(idx: Int, count: Int): Unit
  11. abstract def remove(idx: Int): A
  12. abstract def update(idx: Int, elem: A): Unit

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

Deprecated Value Members

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

Inherited from Shrinkable[A]

Inherited from Growable[A]

Inherited from Clearable

Inherited from Seq[A]

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

Inherited from Cloneable[Buffer[A]]

Inherited from java.lang.Cloneable

Inherited from collection.Seq[A]

Inherited from Equals

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

Inherited from PartialFunction[Int, A]

Inherited from (Int) => A

Inherited from Iterable[A]

Inherited from collection.Iterable[A]

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

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

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

Inherited from IterableOnce[A]

Inherited from AnyRef

Inherited from Any

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

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

Inherited by implicit conversion any2stringadd fromBuffer[A] to any2stringadd[Buffer[A]]

Inherited by implicit conversion StringFormat fromBuffer[A] to StringFormat[Buffer[A]]

Inherited by implicit conversion Ensuring fromBuffer[A] to Ensuring[Buffer[A]]

Inherited by implicit conversion ArrowAssoc fromBuffer[A] to ArrowAssoc[Buffer[A]]

Ungrouped