@@ -206,7 +206,7 @@ trait SeqOps[+A, +CC[_], +C] extends Any with SeqViewOps[A, CC, C] { self =>
206
206
*
207
207
* @return a new $coll consisting of all the elements of this $coll without duplicates.
208
208
*/
209
- def distinct : C = distinctBy(identity)
209
+ override def distinct : C = distinctBy(identity)
210
210
211
211
/** Selects all the elements of this $coll ignoring the duplicates as determined by `==` after applying
212
212
* the transforming function `f`.
@@ -215,7 +215,7 @@ trait SeqOps[+A, +CC[_], +C] extends Any with SeqViewOps[A, CC, C] { self =>
215
215
* @tparam B the type of the elements after being transformed by `f`
216
216
* @return a new $coll consisting of all the elements of this $coll without duplicates.
217
217
*/
218
- def distinctBy [B ](f : A -> B ): C = fromSpecific(new View .DistinctBy (this , f))
218
+ override def distinctBy [B ](f : A -> B ): C = fromSpecific(new View .DistinctBy (this , f))
219
219
220
220
/** Returns new $coll with elements in reversed order.
221
221
*
@@ -293,7 +293,7 @@ trait SeqOps[+A, +CC[_], +C] extends Any with SeqViewOps[A, CC, C] { self =>
293
293
* all elements of this $coll followed by the minimal number of occurrences of `elem` so
294
294
* that the resulting collection has a length of at least `len`.
295
295
*/
296
- def padTo [B >: A ](len : Int , elem : B ): CC [B ] = iterableFactory.from(new View .PadTo (this , len, elem))
296
+ override def padTo [B >: A ](len : Int , elem : B ): CC [B ] = iterableFactory.from(new View .PadTo (this , len, elem))
297
297
298
298
/** Computes the length of the longest segment that starts from the first element
299
299
* and whose elements all satisfy some predicate.
@@ -544,7 +544,7 @@ trait SeqOps[+A, +CC[_], +C] extends Any with SeqViewOps[A, CC, C] { self =>
544
544
* // List(b, b, a)
545
545
* }}}
546
546
*/
547
- def permutations : Iterator [C ] =
547
+ override def permutations : Iterator [C ] =
548
548
if (isEmpty) Iterator .single(coll)
549
549
else new PermutationsItr
550
550
@@ -585,7 +585,7 @@ trait SeqOps[+A, +CC[_], +C] extends Any with SeqViewOps[A, CC, C] { self =>
585
585
* // List(b, a)
586
586
* }}}
587
587
*/
588
- def combinations (n : Int ): Iterator [C ] =
588
+ override def combinations (n : Int ): Iterator [C ] =
589
589
if (n < 0 || n > size) Iterator .empty
590
590
else new CombinationsItr (n)
591
591
@@ -759,7 +759,7 @@ trait SeqOps[+A, +CC[_], +C] extends Any with SeqViewOps[A, CC, C] { self =>
759
759
* List("Bobby", "Bob", "John", "Steve", "Tom")
760
760
* }}}
761
761
*/
762
- def sortWith (lt : (A , A ) => Boolean ): C = sorted(Ordering .fromLessThan(lt))
762
+ override def sortWith (lt : (A , A ) => Boolean ): C = sorted(Ordering .fromLessThan(lt))
763
763
764
764
/** Sorts this $coll according to the Ordering which results from transforming
765
765
* an implicitly given Ordering with a transformation function.
@@ -786,7 +786,7 @@ trait SeqOps[+A, +CC[_], +C] extends Any with SeqViewOps[A, CC, C] { self =>
786
786
* res0: Array[String] = Array(The, dog, fox, the, lazy, over, brown, quick, jumped)
787
787
* }}}
788
788
*/
789
- def sortBy [B ](f : A => B )(implicit ord : Ordering [B ]): C = sorted(ord on f)
789
+ override def sortBy [B ](f : A => B )(implicit ord : Ordering [B ]): C = sorted(ord on f)
790
790
791
791
/** Produces the range of all indices of this sequence.
792
792
* $willForceEvaluation
@@ -944,7 +944,7 @@ trait SeqOps[+A, +CC[_], +C] extends Any with SeqViewOps[A, CC, C] { self =>
944
944
* except that `replaced` elements starting from `from` are replaced
945
945
* by all the elements of `other`.
946
946
*/
947
- def patch [B >: A ](from : Int , other : IterableOnce [B ]^ , replaced : Int ): CC [B ] =
947
+ override def patch [B >: A ](from : Int , other : IterableOnce [B ]^ , replaced : Int ): CC [B ] =
948
948
iterableFactory.from(new View .Patched (this , from, other, replaced))
949
949
.unsafeAssumePure // assume pure OK since iterableFactory.from is eager for Seq
950
950
@@ -957,7 +957,7 @@ trait SeqOps[+A, +CC[_], +C] extends Any with SeqViewOps[A, CC, C] { self =>
957
957
* lazy collection this exception may be thrown at a later time or not at
958
958
* all (if the end of the collection is never evaluated).
959
959
*/
960
- def updated [B >: A ](index : Int , elem : B ): CC [B ] = {
960
+ override def updated [B >: A ](index : Int , elem : B ): CC [B ] = {
961
961
if (index < 0 ) throw new IndexOutOfBoundsException (index.toString)
962
962
val k = knownSize
963
963
if (k >= 0 && index >= k) throw new IndexOutOfBoundsException (index.toString)
0 commit comments