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

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

Deprecated Value Members

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