99package scala .collection
1010
1111import mutable .ArrayBuffer
12- import annotation .{ tailrec , migration }
12+ import annotation .migration
1313import immutable .Stream
1414
1515/** The `Iterator` object provides various functions for creating specialized iterators.
@@ -52,7 +52,7 @@ object Iterator {
5252
5353 /** Creates iterator that produces the results of some element computation a number of times.
5454 *
55- * @param n the number of elements returned by the iterator.
55+ * @param len the number of elements returned by the iterator.
5656 * @param elem the element computation
5757 * @return An iterator that produces the results of `n` evaluations of `elem`.
5858 */
@@ -66,7 +66,7 @@ object Iterator {
6666
6767 /** Creates an iterator producing the values of a given function over a range of integer values starting from 0.
6868 *
69- * @param n The number of elements returned by the iterator
69+ * @param end The number of elements returned by the iterator
7070 * @param f The function computing element values
7171 * @return An iterator that produces the values `f(0), ..., f(n -1)`.
7272 */
@@ -410,10 +410,7 @@ trait Iterator[+A] extends TraversableOnce[A] {
410410 * which `pf` is defined the image `pf(x)`.
411411 * @note Reuse: $consumesAndProducesIterator
412412 */
413- @ migration(2 , 8 ,
414- " This collect implementation bears no relationship to the one before 2.8.\n " +
415- " The previous behavior can be reproduced with toSeq."
416- )
413+ @ migration(" `collect` has changed. The previous behavior can be reproduced with `toSeq`." , " 2.8" )
417414 def collect [B ](pf : PartialFunction [A , B ]): Iterator [B ] = {
418415 val self = buffered
419416 new AbstractIterator [B ] {
@@ -1033,9 +1030,9 @@ trait Iterator[+A] extends TraversableOnce[A] {
10331030
10341031 /** Returns this iterator with patched values.
10351032 *
1036- * @param from The start index from which to patch
1037- * @param ps The iterator of patch values
1038- * @param replaced The number of values in the original iterator that are replaced by the patch.
1033+ * @param from The start index from which to patch
1034+ * @param patchElems The iterator of patch values
1035+ * @param replaced The number of values in the original iterator that are replaced by the patch.
10391036 * @note Reuse: $consumesTwoAndProducesOneIterator
10401037 */
10411038 def patch [B >: A ](from : Int , patchElems : Iterator [B ], replaced : Int ): Iterator [B ] = new AbstractIterator [B ] {
0 commit comments