Skip to content

Commit

Permalink
Update Stepper in the library
Browse files Browse the repository at this point in the history
  • Loading branch information
noti0na1 committed Nov 29, 2024
1 parent ecf2518 commit 008eb08
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scala2-library-cc/src/scala/collection/Stepper.scala
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ trait Stepper[@specialized(Double, Int, Long) +A] {
*
* See method `trySplit` in [[java.util.Spliterator]].
*/
def trySplit(): Stepper[A]
def trySplit(): Stepper[A]^{this}

/** Returns an estimate of the number of elements of this Stepper, or [[Long.MaxValue]]. See
* method `estimateSize` in [[java.util.Spliterator]].
Expand All @@ -71,15 +71,15 @@ trait Stepper[@specialized(Double, Int, Long) +A] {
* a [[java.util.Spliterator.OfInt]] (which is a `Spliterator[Integer]`) in the subclass [[IntStepper]]
* (which is a `Stepper[Int]`).
*/
def spliterator[B >: A]: Spliterator[_]
def spliterator[B >: A]: Spliterator[_]^{this}

/** Returns a Java [[java.util.Iterator]] corresponding to this Stepper.
*
* Note that the return type is `Iterator[_]` instead of `Iterator[A]` to allow returning
* a [[java.util.PrimitiveIterator.OfInt]] (which is a `Iterator[Integer]`) in the subclass
* [[IntStepper]] (which is a `Stepper[Int]`).
*/
def javaIterator[B >: A]: JIterator[_]
def javaIterator[B >: A]: JIterator[_]^{this}

/** Returns an [[Iterator]] corresponding to this Stepper. Note that Iterators corresponding to
* primitive Steppers box the elements.
Expand Down

0 comments on commit 008eb08

Please sign in to comment.