A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.scala-lang.org/api/current/scala/collection/Stepper.html below:

Stepper

scala.collection.Stepper

See theStepper companion object

Steppers exist to enable creating Java streams over Scala collections, see scala.jdk.StreamConverters. Besides that use case, they allow iterating over collections holding unboxed primitives (e.g., Array[Int]) without boxing the elements.

Steppers have an iterator-like interface with methods hasStep and nextStep(). The difference to iterators - and the reason Stepper is not a subtype of Iterator - is that there are hand-specialized variants of Stepper for Int, Long and Double (IntStepper, etc.). These enable iterating over collections holding unboxed primitives (e.g., Arrays, scala.jdk.Accumulators) without boxing the elements.

The selection of primitive types (Int, Long and Double) matches the hand-specialized variants of Java Streams (java.util.stream.Stream, java.util.stream.IntStream, etc.) and the corresponding Java Spliterators (java.util.Spliterator, java.util.Spliterator.OfInt, etc.).

Steppers can be converted to Scala Iterators, Java Iterators and Java Spliterators. Primitive Steppers are converted to the corresponding primitive Java Iterators and Spliterators.

Type parameters
A

the element type of the Stepper

Attributes
Companion
object
Source
Stepper.scala
Graph
Supertypes
Known subtypes
Members list

Returns a set of characteristics of this Stepper and its elements.

Returns an estimate of the number of elements of this Stepper, or Long.MaxValue.

Check if there's an element available.

Check if there's an element available.

Attributes
Source
Stepper.scala

Return the next element and advance the stepper

Return the next element and advance the stepper

Attributes
Source
Stepper.scala

Split this stepper, if applicable.

Split this stepper, if applicable. The elements of the current Stepper are split up between the resulting Stepper and the current stepper.

May return null, in which case the current Stepper yields the same elements as before.

See method trySplit in java.util.Spliterator.

Attributes
Source
Stepper.scala

Returns an Iterator corresponding to this Stepper.

Returns an Iterator corresponding to this Stepper. Note that Iterators corresponding to primitive Steppers box the elements.

Attributes
Source
Stepper.scala

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4