StreamHasToScala
- Source
- StreamExtensions.scala
Value members
Concrete methods
Convert a generic Java Stream wrapping a primitive type to a corresponding primitive Stream.
Convert a generic Java Stream wrapping a primitive type to a corresponding primitive Stream.
- Source
- StreamExtensions.scala
Copy the elements of this stream into a Scala collection.
Copy the elements of this stream into a Scala collection.
Converting a parallel streams to an scala.jdk.Accumulator using stream.toScala(Accumulator)
builds the result in parallel.
A toScala(Accumulator)
call automatically converts streams of boxed integers, longs or
doubles are converted to the primitive accumulators (scala.jdk.IntAccumulator, etc.).
When converting a parallel stream to a different Scala collection, the stream is first converted into an scala.jdk.Accumulator, which supports parallel building. The accumulator is then converted to the target collection. Note that the stream is processed eagerly while building the accumulator, even if the target collection is lazy.
Sequential streams are directly converted to the target collection. If the target collection is lazy, the conversion is lazy as well.
- Source
- StreamExtensions.scala