File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
src/library/scala/collection/mutable Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -19,13 +19,29 @@ trait Buffer[A]
1919 */
2020 def prepend (elem : A ): this .type
2121
22+ /** Appends the given elements to this buffer.
23+ *
24+ * @param elem the element to append.
25+ */
2226 @ `inline` final def append (elem : A ): this .type = addOne(elem)
2327
28+ @ deprecated(" Use appendAll instead" , " 2.13.0" )
29+ @ `inline` final def append (elems : A * ): this .type = addAll(elems)
30+
31+ /** Appends the elements contained in a iterable object to this buffer.
32+ * @param xs the iterable object containing the elements to append.
33+ */
34+ @ `inline` final def appendAll (xs : IterableOnce [A ]): this .type = addAll(xs)
35+
36+
2437 /** Alias for `prepend` */
2538 @ `inline` final def +=: (elem : A ): this .type = prepend(elem)
2639
2740 def prependAll (elems : IterableOnce [A ]): this .type = { insertAll(0 , elems); this }
2841
42+ @ deprecated(" Use prependAll instead" , " 2.13.0" )
43+ @ `inline` final def prepend (elems : A * ): this .type = prependAll(elems)
44+
2945 /** Inserts a new element at a given index into this buffer.
3046 *
3147 * @param idx the index where the new elements is inserted.
You can’t perform that action at this time.
0 commit comments