@@ -620,18 +620,20 @@ trait IterableOnceOps[+A, +CC[_], +C] extends Any { this: IterableOnce[A] =>
620
620
@ deprecated(" Use `dest ++= coll` instead" , " 2.13.0" )
621
621
@ inline final def copyToBuffer [B >: A ](dest : mutable.Buffer [B ]): Unit = dest ++= this
622
622
623
- /** Copy elements of this collection to an array.
624
- * Fills the given array `xs` starting at index `start`.
625
- * Copying will stop once either the all elements of this collection have been copied,
623
+ /** Copy elements to an array.
624
+ *
625
+ * Fills the given array `xs` starting at index `start` with values of this $coll.
626
+ *
627
+ * Copying will stop once either all the elements of this $coll have been copied,
626
628
* or the end of the array is reached.
627
629
*
628
630
* @param xs the array to fill.
629
- * @param start the starting index.
631
+ * @param start the starting index of xs .
630
632
* @tparam B the type of the elements of the array.
631
633
*
632
634
* @usecase def copyToArray(xs: Array[A], start: Int): Unit
633
635
*
634
- * $willNotTerminateInf
636
+ * $willNotTerminateInf
635
637
*/
636
638
def copyToArray [B >: A ](xs : Array [B ], start : Int = 0 ): xs.type = {
637
639
val it = iterator()
@@ -643,14 +645,15 @@ trait IterableOnceOps[+A, +CC[_], +C] extends Any { this: IterableOnce[A] =>
643
645
xs
644
646
}
645
647
646
- /** Copy elements of this collection to an array.
647
- * Fills the given array `xs` starting at index `start` with at most
648
- * `len` values produced by this iterator.
649
- * Copying will stop once either the all elements of this collection have been copied,
648
+ /** Copy elements to an array.
649
+ *
650
+ * Fills the given array `xs` starting at index `start` with at most `len` elements of this $coll.
651
+ *
652
+ * Copying will stop once either all the elements of this $coll have been copied,
650
653
* or the end of the array is reached, or `len` elements have been copied.
651
654
*
652
655
* @param xs the array to fill.
653
- * @param start the starting index.
656
+ * @param start the starting index of xs .
654
657
* @param len the maximal number of elements to copy.
655
658
* @tparam B the type of the elements of the array.
656
659
*
@@ -723,7 +726,7 @@ trait IterableOnceOps[+A, +CC[_], +C] extends Any { this: IterableOnce[A] =>
723
726
throw new UnsupportedOperationException (" empty.min" )
724
727
reduceLeft((x, y) => if (ord.lteq(x, y)) x else y)
725
728
}
726
-
729
+
727
730
/** Finds the smallest element.
728
731
*
729
732
* @param ord An ordering to be used for comparing elements.
@@ -760,7 +763,7 @@ trait IterableOnceOps[+A, +CC[_], +C] extends Any { this: IterableOnce[A] =>
760
763
throw new UnsupportedOperationException (" empty.max" )
761
764
reduceLeft((x, y) => if (ord.gteq(x, y)) x else y)
762
765
}
763
-
766
+
764
767
/** Finds the largest element.
765
768
*
766
769
* @param ord An ordering to be used for comparing elements.
0 commit comments