Scala Standard Library 2.13.3 - 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 ++=(xs: 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(xs: IterableOnce[A]): Buffer.this.type
  18. final def addString(b: StringBuilder): StringBuilder
  19. final def addString(b: StringBuilder, sep: String): StringBuilder
  20. def addString(b: StringBuilder, start: String, sep: String, end: String): StringBuilder
  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(xs: 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](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 formatted(fmtstr: String): String
  79. def fromSpecific(coll: IterableOnce[A]): Buffer[A]
  80. final def getClass(): Class[_ <: AnyRef]
  81. def groupBy[K](f: (A) => K): immutable.Map[K, Buffer[A]]
  82. def groupMap[K, B](key: (A) => K)(f: (A) => B): immutable.Map[K, Buffer[B]]
  83. def groupMapReduce[K, B](key: (A) => K)(f: (A) => B)(reduce: (B, B) => B): immutable.Map[K, B]
  84. def grouped(size: Int): Iterator[Buffer[A]]
  85. def hashCode(): Int
  86. def head: A
  87. def headOption: Option[A]
  88. def indexOf[B >: A](elem: B): Int
  89. def indexOf[B >: A](elem: B, from: Int): Int
  90. def indexOfSlice[B >: A](that: collection.Seq[B]): Int
  91. def indexOfSlice[B >: A](that: collection.Seq[B], from: Int): Int
  92. def indexWhere(p: (A) => Boolean): Int
  93. def indexWhere(p: (A) => Boolean, from: Int): Int
  94. def indices: immutable.Range
  95. def init: Buffer[A]
  96. def inits: Iterator[Buffer[A]]
  97. def intersect[B >: A](that: collection.Seq[B]): Buffer[A]
  98. def isDefinedAt(idx: Int): Boolean
  99. def isEmpty: Boolean
  100. final def isInstanceOf[T0]: Boolean
  101. def isTraversableAgain: Boolean
  102. def iterableFactory: SeqFactory[Buffer]
  103. def knownSize: Int
  104. def last: A
  105. def lastIndexOf[B >: A](elem: B, end: Int = length - 1): Int
  106. def lastIndexOfSlice[B >: A](that: collection.Seq[B]): Int
  107. def lastIndexOfSlice[B >: A](that: collection.Seq[B], end: Int): Int
  108. def lastIndexWhere(p: (A) => Boolean): Int
  109. def lastIndexWhere(p: (A) => Boolean, end: Int): Int
  110. def lastOption: Option[A]
  111. def lazyZip[B](that: collection.Iterable[B]): LazyZip2[A, B, Buffer.this.type]
  112. def lengthCompare(that: collection.Iterable[_]): Int
  113. def lengthCompare(len: Int): Int
  114. final def lengthIs: SizeCompareOps
  115. def lift: (Int) => Option[A]
  116. def map[B](f: (A) => B): Buffer[B]
  117. def max[B >: A](implicit ord: math.Ordering[B]): A
  118. def maxBy[B](f: (A) => B)(implicit cmp: math.Ordering[B]): A
  119. def maxByOption[B](f: (A) => B)(implicit cmp: math.Ordering[B]): Option[A]
  120. def maxOption[B >: A](implicit ord: math.Ordering[B]): Option[A]
  121. def min[B >: A](implicit ord: math.Ordering[B]): A
  122. def minBy[B](f: (A) => B)(implicit cmp: math.Ordering[B]): A
  123. def minByOption[B](f: (A) => B)(implicit cmp: math.Ordering[B]): Option[A]
  124. def minOption[B >: A](implicit ord: math.Ordering[B]): Option[A]
  125. final def mkString: String
  126. final def mkString(sep: String): String
  127. final def mkString(start: String, sep: String, end: String): String
  128. final def ne(arg0: AnyRef): Boolean
  129. def newSpecificBuilder: Builder[A, Buffer[A]]
  130. def nonEmpty: Boolean
  131. final def notify(): Unit
  132. final def notifyAll(): Unit
  133. def occCounts[B](sq: collection.Seq[B]): Map[B, Int]
  134. def orElse[A1 <: Int, B1 >: A](that: PartialFunction[A1, B1]): PartialFunction[A1, B1]
  135. def padTo[B >: A](len: Int, elem: B): Buffer[B]
  136. def padToInPlace(len: Int, elem: A): Buffer.this.type
  137. def partition(p: (A) => Boolean): (Buffer[A], Buffer[A])
  138. def partitionMap[A1, A2](f: (A) => Either[A1, A2]): (Buffer[A1], Buffer[A2])
  139. def patch[B >: A](from: Int, other: IterableOnce[B], replaced: Int): Buffer[B]
  140. def permutations: Iterator[Buffer[A]]
  141. def prependAll(elems: IterableOnce[A]): Buffer.this.type
  142. def prepended[B >: A](elem: B): Buffer[B]
  143. def prependedAll[B >: A](prefix: IterableOnce[B]): Buffer[B]
  144. def product[B >: A](implicit num: math.Numeric[B]): B
  145. def reduce[B >: A](op: (B, B) => B): B
  146. def reduceLeft[B >: A](op: (B, A) => B): B
  147. def reduceLeftOption[B >: A](op: (B, A) => B): Option[B]
  148. def reduceOption[B >: A](op: (B, B) => B): Option[B]
  149. def reduceRight[B >: A](op: (A, B) => B): B
  150. def reduceRightOption[B >: A](op: (A, B) => B): Option[B]
  151. def reverse: Buffer[A]
  152. def reverseIterator: Iterator[A]
  153. def reversed: collection.Iterable[A]
  154. def runWith[U](action: (A) => U): (Int) => Boolean
  155. def sameElements[B >: A](that: IterableOnce[B]): Boolean
  156. def scan[B >: A](z: B)(op: (B, B) => B): Buffer[B]
  157. def scanLeft[B](z: B)(op: (B, A) => B): Buffer[B]
  158. def scanRight[B](z: B)(op: (A, B) => B): Buffer[B]
  159. def search[B >: A](elem: B, from: Int, to: Int)(implicit ord: Ordering[B]): SearchResult
  160. def search[B >: A](elem: B)(implicit ord: Ordering[B]): SearchResult
  161. def segmentLength(p: (A) => Boolean, from: Int): Int
  162. final def segmentLength(p: (A) => Boolean): Int
  163. final def size: Int
  164. final def sizeCompare(that: collection.Iterable[_]): Int
  165. final def sizeCompare(otherSize: Int): Int
  166. final def sizeIs: SizeCompareOps
  167. def slice(from: Int, until: Int): Buffer[A]
  168. def sliceInPlace(start: Int, end: Int): Buffer.this.type
  169. def sliding(size: Int, step: Int): Iterator[Buffer[A]]
  170. def sliding(size: Int): Iterator[Buffer[A]]
  171. def sortBy[B](f: (A) => B)(implicit ord: Ordering[B]): Buffer[A]
  172. def sortWith(lt: (A, A) => Boolean): Buffer[A]
  173. def sorted[B >: A](implicit ord: Ordering[B]): Buffer[A]
  174. def span(p: (A) => Boolean): (Buffer[A], Buffer[A])
  175. def splitAt(n: Int): (Buffer[A], Buffer[A])
  176. def startsWith[B >: A](that: IterableOnce[B], offset: Int = 0): Boolean
  177. def stepper[S <: Stepper[_]](implicit shape: StepperShape[A, S]): S
  178. def stringPrefix: String
  179. def subtractAll(xs: IterableOnce[A]): Buffer.this.type
  180. def subtractOne(x: A): Buffer.this.type
  181. def sum[B >: A](implicit num: math.Numeric[B]): B
  182. final def synchronized[T0](arg0: => T0): T0
  183. def tail: Buffer[A]
  184. def tails: Iterator[Buffer[A]]
  185. def take(n: Int): Buffer[A]
  186. def takeInPlace(n: Int): Buffer.this.type
  187. def takeRight(n: Int): Buffer[A]
  188. def takeRightInPlace(n: Int): Buffer.this.type
  189. def takeWhile(p: (A) => Boolean): Buffer[A]
  190. def takeWhileInPlace(p: (A) => Boolean): Buffer.this.type
  191. def tapEach[U](f: (A) => U): Buffer[A]
  192. def to[C1](factory: Factory[A, C1]): C1
  193. def toArray[B >: A](implicit arg0: ClassTag[B]): Array[B]
  194. final def toBuffer[B >: A]: Buffer[B]
  195. def toIndexedSeq: immutable.IndexedSeq[A]
  196. final def toIterable: Buffer.this.type
  197. def toList: immutable.List[A]
  198. def toMap[K, V](implicit ev: <:<[A, (K, V)]): immutable.Map[K, V]
  199. def toSeq: immutable.Seq[A]
  200. def toSet[B >: A]: immutable.Set[B]
  201. def toString(): String
  202. def toVector: immutable.Vector[A]
  203. def transpose[B](implicit asIterable: (A) => collection.Iterable[B]): Buffer[Buffer[B]]
  204. def trimEnd(n: Int): Unit
  205. def trimStart(n: Int): Unit
  206. def unapply(a: Int): Option[A]
  207. def unlift: PartialFunction[Int, B]
  208. def unzip[A1, A2](implicit asPair: (A) => (A1, A2)): (Buffer[A1], Buffer[A2])
  209. def unzip3[A1, A2, A3](implicit asTriple: (A) => (A1, A2, A3)): (Buffer[A1], Buffer[A2], Buffer[A3])
  210. def updated[B >: A](index: Int, elem: B): Buffer[B]
  211. def view: SeqView[A]
  212. final def wait(): Unit
  213. final def wait(arg0: Long, arg1: Int): Unit
  214. final def wait(arg0: Long): Unit
  215. def withFilter(p: (A) => Boolean): WithFilter[A, [_]Buffer[_]]
  216. def zip[B](that: IterableOnce[B]): Buffer[(A, B)]
  217. def zipAll[A1 >: A, B](that: collection.Iterable[B], thisElem: A1, thatElem: B): Buffer[(A1, B)]
  218. 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 hasDefiniteSize: Boolean
  24. def isEmpty: Boolean
  25. def map[B](f: (A) => B): IterableOnce[B]
  26. def max(implicit ord: math.Ordering[A]): A
  27. def maxBy[B](f: (A) => B)(implicit cmp: math.Ordering[B]): A
  28. def min(implicit ord: math.Ordering[A]): A
  29. def minBy[B](f: (A) => B)(implicit cmp: math.Ordering[B]): A
  30. def mkString: String
  31. def mkString(sep: String): String
  32. def mkString(start: String, sep: String, end: String): String
  33. def nonEmpty: Boolean
  34. final def prefixLength(p: (A) => Boolean): Int
  35. final def prepend(elems: A*): Buffer.this.type
  36. def product(implicit num: math.Numeric[A]): A
  37. def reduce(f: (A, A) => A): A
  38. def reduceLeft(f: (A, A) => A): A
  39. def reduceLeftOption(f: (A, A) => A): Option[A]
  40. def reduceOption(f: (A, A) => A): Option[A]
  41. def reduceRight(f: (A, A) => A): A
  42. def reduceRightOption(f: (A, A) => A): Option[A]
  43. final def repr: Buffer[A]
  44. def reverseMap[B](f: (A) => B): Buffer[B]
  45. def sameElements[B >: A](that: IterableOnce[B]): Boolean
  46. def seq: Buffer.this.type
  47. def size: Int
  48. def sum(implicit num: math.Numeric[A]): A
  49. def to[C1](factory: Factory[A, C1]): C1
  50. def toArray[B >: A](implicit arg0: ClassTag[B]): Array[B]
  51. def toBuffer[B >: A]: Buffer[B]
  52. def toIndexedSeq: collection.IndexedSeq[A]
  53. final def toIterable: collection.Iterable[A]
  54. def toIterator: Iterator[A]
  55. final def toIterator: Iterator[A]
  56. def toList: immutable.List[A]
  57. def toMap[K, V](implicit ev: <:<[A, (K, V)]): immutable.Map[K, V]
  58. def toSeq: immutable.Seq[A]
  59. def toSet[B >: A]: immutable.Set[B]
  60. def toStream: immutable.Stream[A]
  61. final def toStream: immutable.Stream[A]
  62. final def toTraversable: collection.Traversable[A]
  63. final def toTraversable: collection.Traversable[A]
  64. def toVector: immutable.Vector[A]
  65. final def transform(f: (A) => A): Buffer.this.type
  66. final def union[B >: A](that: collection.Seq[B]): Buffer[B]
  67. def view(from: Int, until: Int): View[A]
  68. def withFilter(f: (A) => Boolean): Iterator[A]
  69. 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