Skip to content

Commit b3d948f

Browse files
committed
Replace "Traversable" by corresponding "Iterable" in doc comments.
1 parent ead6684 commit b3d948f

File tree

7 files changed

+15
-15
lines changed

7 files changed

+15
-15
lines changed

library/src/scala/Array.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,7 @@ object Array {
429429
*
430430
* @param n The number of elements in the array
431431
* @param f The function computing element values
432-
* @return A traversable consisting of elements `f(0),f(1), ..., f(n - 1)`
432+
* @return An `Array` consisting of elements `f(0),f(1), ..., f(n - 1)`
433433
*/
434434
def tabulate[T: ClassTag](n: Int)(f: Int => T): Array[T] = {
435435
if (n <= 0) {

library/src/scala/Option.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ object Option {
122122
* }}}
123123
*
124124
* @note Many of the methods in here are duplicative with those
125-
* in the Traversable hierarchy, but they are duplicated for a reason:
125+
* in the Iterable hierarchy, but they are duplicated for a reason:
126126
* the implicit conversion tends to leave one with an Iterable in
127127
* situations where one could have retained an Option.
128128
*

library/src/scala/collection/Iterable.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -719,7 +719,7 @@ trait IterableOps[+A, +CC[_], +C] extends Any with IterableOnce[A] with Iterable
719719
* right hand operand. The element type of the $coll is the most specific superclass encompassing
720720
* the element types of the two operands.
721721
*
722-
* @param suffix the traversable to append.
722+
* @param suffix the iterable to append.
723723
* @tparam B the element type of the returned collection.
724724
* @return a new $coll which contains all elements
725725
* of this $coll followed by all elements of `suffix`.

library/src/scala/collection/IterableOnce.scala

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -437,8 +437,8 @@ trait IterableOnceOps[+A, +CC[_], +C] extends Any { this: IterableOnce[A] =>
437437
*/
438438
def flatMap[B](f: A => IterableOnce[B]): CC[B]
439439

440-
/** Converts this $coll of traversable collections into
441-
* a $coll formed by the elements of these traversable
440+
/** Converts this $coll of iterable collections into
441+
* a $coll formed by the elements of these iterable
442442
* collections.
443443
*
444444
* The resulting collection's type will be guided by the
@@ -458,9 +458,9 @@ trait IterableOnceOps[+A, +CC[_], +C] extends Any { this: IterableOnce[A] =>
458458
* // ys == Set(1, 2, 3)
459459
* }}}
460460
*
461-
* @tparam B the type of the elements of each traversable collection.
461+
* @tparam B the type of the elements of each iterable collection.
462462
* @param asIterable an implicit conversion which asserts that the element
463-
* type of this $coll is a `GenTraversable`.
463+
* type of this $coll is an `Iterable`.
464464
* @return a new $coll resulting from concatenating all element ${coll}s.
465465
*/
466466
def flatten[B](implicit asIterable: A => IterableOnce[B]): CC[B]
@@ -818,7 +818,7 @@ trait IterableOnceOps[+A, +CC[_], +C] extends Any { this: IterableOnce[A] =>
818818

819819
/** Tests whether the $coll is empty.
820820
*
821-
* Note: Implementations in subclasses that are not repeatedly traversable must take
821+
* Note: Implementations in subclasses that are not repeatedly iterable must take
822822
* care not to consume any elements when `isEmpty` is called.
823823
*
824824
* @return `true` if the $coll contains no elements, `false` otherwise.

library/src/scala/collection/Map.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ trait MapOps[K, +V, +CC[_, _] <: IterableOps[_, AnyConstr, _], +C]
324324
* right hand operand. The element type of the $coll is the most specific superclass encompassing
325325
* the element types of the two operands.
326326
*
327-
* @param suffix the traversable to append.
327+
* @param suffix the iterable to append.
328328
* @return a new $coll which contains all elements
329329
* of this $coll followed by all elements of `suffix`.
330330
*/

library/src/scala/collection/mutable/Queue.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,10 @@ class Queue[A] protected (array: Array[AnyRef], start: Int, end: Int)
6060
*/
6161
def enqueue(elem1: A, elem2: A, elems: A*): this.type = enqueue(elem1).enqueue(elem2).enqueueAll(elems)
6262

63-
/** Enqueues all elements in the given traversable object into the queue. The
64-
* last element in the traversable object will be on front of the new queue.
63+
/** Enqueues all elements in the given iterable object into the queue. The
64+
* last element in the iterable object will be on front of the new queue.
6565
*
66-
* @param elems the traversable object.
66+
* @param elems the iterable object.
6767
* @return this
6868
*/
6969
def enqueueAll(elems: scala.collection.IterableOnce[A]): this.type = this ++= elems

library/src/scala/collection/mutable/Stack.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,10 @@ class Stack[A] protected (array: Array[AnyRef], start: Int, end: Int)
7070
prepend(elem1).prepend(elem2).pushAll(elems)
7171
}
7272

73-
/** Push all elements in the given traversable object onto the stack. The
74-
* last element in the traversable object will be on top of the new stack.
73+
/** Push all elements in the given iterable object onto the stack. The
74+
* last element in the iterable object will be on top of the new stack.
7575
*
76-
* @param elems the traversable object.
76+
* @param elems the iterable object.
7777
* @return the stack with the new elements on top.
7878
*/
7979
def pushAll(elems: scala.collection.IterableOnce[A]): this.type =

0 commit comments

Comments
 (0)