@@ -39,27 +39,26 @@ trait GenIterableLike[+A, +Repr] extends Any with GenTraversableLike[A, Repr] {
39
39
def iterator : Iterator [A ]
40
40
41
41
/** Checks if the other iterable collection contains the same elements in the same order as this $coll.
42
- *
43
- * $orderDependent
44
- * $willNotTerminateInf
45
42
*
46
43
* @param that the collection to compare with.
47
44
* @tparam B the type of the elements of collection `that`.
48
45
* @return `true`, if both collections contain the same elements in the same order, `false` otherwise.
49
46
*
50
47
* @usecase def sameElements(that: GenIterable[A]): Boolean
48
+ * @inheritdoc
51
49
*
52
- * @param that the collection to compare with.
53
- * @return `true`, if both collections contain the same elements in the same order, `false` otherwise.
50
+ * $orderDependent
51
+ * $willNotTerminateInf
52
+ *
53
+ * @param that the collection to compare with.
54
+ * @return `true`, if both collections contain the same elements in the same order, `false` otherwise.
54
55
*/
55
56
def sameElements [A1 >: A ](that : GenIterable [A1 ]): Boolean
56
57
57
58
/** Returns a $coll formed from this $coll and another iterable collection
58
59
* by combining corresponding elements in pairs.
59
60
* If one of the two collections is longer than the other, its remaining elements are ignored.
60
61
*
61
- * $orderDependent
62
- *
63
62
* @param that The iterable providing the second half of each result pair
64
63
* @tparam A1 the type of the first half of the returned pairs (this is always a supertype
65
64
* of the collection's element type `A`).
@@ -71,18 +70,19 @@ trait GenIterableLike[+A, +Repr] extends Any with GenTraversableLike[A, Repr] {
71
70
* of the returned collection is the minimum of the lengths of this $coll and `that`.
72
71
*
73
72
* @usecase def zip[B](that: GenIterable[B]): $Coll[(A, B)]
73
+ * @inheritdoc
74
74
*
75
- * @param that The iterable providing the second half of each result pair
76
- * @tparam B the type of the second half of the returned pairs
77
- * @return a new $coll containing pairs consisting of
78
- * corresponding elements of this $coll and `that`. The length
79
- * of the returned collection is the minimum of the lengths of this $coll and `that`.
75
+ * $orderDependent
76
+ *
77
+ * @param that The iterable providing the second half of each result pair
78
+ * @tparam B the type of the second half of the returned pairs
79
+ * @return a new $coll containing pairs consisting of
80
+ * corresponding elements of this $coll and `that`. The length
81
+ * of the returned collection is the minimum of the lengths of this $coll and `that`.
80
82
*/
81
83
def zip [A1 >: A , B , That ](that : GenIterable [B ])(implicit bf : CBF [Repr , (A1 , B ), That ]): That
82
84
83
85
/** Zips this $coll with its indices.
84
- *
85
- * $orderDependent
86
86
*
87
87
* @tparam A1 the type of the first half of the returned pairs (this is always a supertype
88
88
* of the collection's element type `A`).
@@ -98,11 +98,14 @@ trait GenIterableLike[+A, +Repr] extends Any with GenTraversableLike[A, Repr] {
98
98
* $coll paired with their index. Indices start at `0`.
99
99
*
100
100
* @usecase def zipWithIndex: $Coll[(A, Int)]
101
+ * @inheritdoc
101
102
*
102
- * @return A new $coll containing pairs consisting of all elements of this
103
- * $coll paired with their index. Indices start at `0`.
104
- * @example
105
- * `List("a", "b", "c").zipWithIndex = List(("a", 0), ("b", 1), ("c", 2))`
103
+ * $orderDependent
104
+ *
105
+ * @return A new $coll containing pairs consisting of all elements of this
106
+ * $coll paired with their index. Indices start at `0`.
107
+ * @example
108
+ * `List("a", "b", "c").zipWithIndex = List(("a", 0), ("b", 1), ("c", 2))`
106
109
*
107
110
*/
108
111
def zipWithIndex [A1 >: A , That ](implicit bf : CBF [Repr , (A1 , Int ), That ]): That
@@ -112,8 +115,6 @@ trait GenIterableLike[+A, +Repr] extends Any with GenTraversableLike[A, Repr] {
112
115
* If one of the two collections is shorter than the other,
113
116
* placeholder elements are used to extend the shorter collection to the length of the longer.
114
117
*
115
- * $orderDependent
116
- *
117
118
* @param that the iterable providing the second half of each result pair
118
119
* @param thisElem the element to be used to fill up the result if this $coll is shorter than `that`.
119
120
* @param thatElem the element to be used to fill up the result if `that` is shorter than this $coll.
@@ -124,16 +125,19 @@ trait GenIterableLike[+A, +Repr] extends Any with GenTraversableLike[A, Repr] {
124
125
* If `that` is shorter than this $coll, `thatElem` values are used to pad the result.
125
126
*
126
127
* @usecase def zipAll[B](that: Iterable[B], thisElem: A, thatElem: B): $Coll[(A, B)]
127
- *
128
- * @param that The iterable providing the second half of each result pair
129
- * @param thisElem the element to be used to fill up the result if this $coll is shorter than `that`.
130
- * @param thatElem the element to be used to fill up the result if `that` is shorter than this $coll.
131
- * @tparam B the type of the second half of the returned pairs
132
- * @return a new $coll containing pairs consisting of
133
- * corresponding elements of this $coll and `that`. The length
134
- * of the returned collection is the maximum of the lengths of this $coll and `that`.
135
- * If this $coll is shorter than `that`, `thisElem` values are used to pad the result.
136
- * If `that` is shorter than this $coll, `thatElem` values are used to pad the result.
128
+ * @inheritdoc
129
+ *
130
+ * $orderDependent
131
+ *
132
+ * @param that The iterable providing the second half of each result pair
133
+ * @param thisElem the element to be used to fill up the result if this $coll is shorter than `that`.
134
+ * @param thatElem the element to be used to fill up the result if `that` is shorter than this $coll.
135
+ * @tparam B the type of the second half of the returned pairs
136
+ * @return a new $coll containing pairs consisting of
137
+ * corresponding elements of this $coll and `that`. The length
138
+ * of the returned collection is the maximum of the lengths of this $coll and `that`.
139
+ * If this $coll is shorter than `that`, `thisElem` values are used to pad the result.
140
+ * If `that` is shorter than this $coll, `thatElem` values are used to pad the result.
137
141
*/
138
142
def zipAll [B , A1 >: A , That ](that : GenIterable [B ], thisElem : A1 , thatElem : B )(implicit bf : CBF [Repr , (A1 , B ), That ]): That
139
143
0 commit comments