W3cubDocs

/Scala 3.2

Object StreamConverters.StreamConverters

This object contains methods to create Java Streams that operate on Scala collections (sequentially or in parallel). For more information on Java streams, consult the documentation (https://docs.oracle.com/javase/8/docs/api/java/util/stream/package-summary.html).

The explicit conversion methods defined here are intended to be used in Java code. For Scala code, it is recommended to use the extension methods defined in scala.jdk.StreamConverters.

Note: to convert between Scala collections and classic Java collections, use CollectionConverters.

For details how the stream converters work, see scala.jdk.StreamConverters.

Supertypes
Self type

Concrete methods

Source

Create a parallel Java DoubleStream for a Scala collection.

Note: parallel processing is only efficient for collections that have a scala.collection.Stepper implementation which supports efficient splitting. For collections where this is the case, the stepper method has a return type marked with EfficientSplit.

Note: this method uses the boxed type java.lang.X instead of the primitive type scala.X to improve compatibility when using it in Java code (the Scala compiler emits C[Int] as C[Object] in bytecode due to scala/bug#4214). In Scala code, add import scala.jdk.StreamConverters._ and use the extension methods instead.

Source

Create a parallel Java DoubleStream for a Scala collection.

Note: parallel processing is only efficient for collections that have a scala.collection.Stepper implementation which supports efficient splitting. For collections where this is the case, the stepper method has a return type marked with EfficientSplit.

Note: this method uses the boxed type java.lang.X instead of the primitive type scala.X to improve compatibility when using it in Java code (the Scala compiler emits C[Int] as C[Object] in bytecode due to scala/bug#4214). In Scala code, add import scala.jdk.StreamConverters._ and use the extension methods instead.

Source

Create a parallel Java IntStream for a Scala collection.

Note: parallel processing is only efficient for collections that have a scala.collection.Stepper implementation which supports efficient splitting. For collections where this is the case, the stepper method has a return type marked with EfficientSplit.

Note: this method uses the boxed type java.lang.X instead of the primitive type scala.X to improve compatibility when using it in Java code (the Scala compiler emits C[Int] as C[Object] in bytecode due to scala/bug#4214). In Scala code, add import scala.jdk.StreamConverters._ and use the extension methods instead.

Source

Create a parallel Java IntStream for a Scala collection.

Note: parallel processing is only efficient for collections that have a scala.collection.Stepper implementation which supports efficient splitting. For collections where this is the case, the stepper method has a return type marked with EfficientSplit.

Note: this method uses the boxed type java.lang.X instead of the primitive type scala.X to improve compatibility when using it in Java code (the Scala compiler emits C[Int] as C[Object] in bytecode due to scala/bug#4214). In Scala code, add import scala.jdk.StreamConverters._ and use the extension methods instead.

Source

Create a parallel Java IntStream for a Scala collection.

Note: parallel processing is only efficient for collections that have a scala.collection.Stepper implementation which supports efficient splitting. For collections where this is the case, the stepper method has a return type marked with EfficientSplit.

Note: this method uses the boxed type java.lang.X instead of the primitive type scala.X to improve compatibility when using it in Java code (the Scala compiler emits C[Int] as C[Object] in bytecode due to scala/bug#4214). In Scala code, add import scala.jdk.StreamConverters._ and use the extension methods instead.

Source

Create a parallel Java IntStream for a Scala collection.

Note: parallel processing is only efficient for collections that have a scala.collection.Stepper implementation which supports efficient splitting. For collections where this is the case, the stepper method has a return type marked with EfficientSplit.

Note: this method uses the boxed type java.lang.X instead of the primitive type scala.X to improve compatibility when using it in Java code (the Scala compiler emits C[Int] as C[Object] in bytecode due to scala/bug#4214). In Scala code, add import scala.jdk.StreamConverters._ and use the extension methods instead.

Source

Create a parallel Java DoubleStream for the keys of a Scala Map.

Note: parallel processing is only efficient for collections that have a scala.collection.Stepper implementation which supports efficient splitting. For collections where this is the case, the stepper method has a return type marked with EfficientSplit.

Note: this method uses the boxed type java.lang.X instead of the primitive type scala.X to improve compatibility when using it in Java code (the Scala compiler emits C[Int] as C[Object] in bytecode due to scala/bug#4214). In Scala code, add import scala.jdk.StreamConverters._ and use the extension methods instead.

Source

Create a parallel Java DoubleStream for the keys of a Scala Map.

Note: parallel processing is only efficient for collections that have a scala.collection.Stepper implementation which supports efficient splitting. For collections where this is the case, the stepper method has a return type marked with EfficientSplit.

Note: this method uses the boxed type java.lang.X instead of the primitive type scala.X to improve compatibility when using it in Java code (the Scala compiler emits C[Int] as C[Object] in bytecode due to scala/bug#4214). In Scala code, add import scala.jdk.StreamConverters._ and use the extension methods instead.

Source

Create a parallel Java IntStream for the keys of a Scala Map.

Note: parallel processing is only efficient for collections that have a scala.collection.Stepper implementation which supports efficient splitting. For collections where this is the case, the stepper method has a return type marked with EfficientSplit.

Note: this method uses the boxed type java.lang.X instead of the primitive type scala.X to improve compatibility when using it in Java code (the Scala compiler emits C[Int] as C[Object] in bytecode due to scala/bug#4214). In Scala code, add import scala.jdk.StreamConverters._ and use the extension methods instead.

Source

Create a parallel Java IntStream for the keys of a Scala Map.

Note: parallel processing is only efficient for collections that have a scala.collection.Stepper implementation which supports efficient splitting. For collections where this is the case, the stepper method has a return type marked with EfficientSplit.

Note: this method uses the boxed type java.lang.X instead of the primitive type scala.X to improve compatibility when using it in Java code (the Scala compiler emits C[Int] as C[Object] in bytecode due to scala/bug#4214). In Scala code, add import scala.jdk.StreamConverters._ and use the extension methods instead.

Source

Create a parallel Java IntStream for the keys of a Scala Map.

Note: parallel processing is only efficient for collections that have a scala.collection.Stepper implementation which supports efficient splitting. For collections where this is the case, the stepper method has a return type marked with EfficientSplit.

Note: this method uses the boxed type java.lang.X instead of the primitive type scala.X to improve compatibility when using it in Java code (the Scala compiler emits C[Int] as C[Object] in bytecode due to scala/bug#4214). In Scala code, add import scala.jdk.StreamConverters._ and use the extension methods instead.

Source

Create a parallel Java IntStream for the keys of a Scala Map.

Note: parallel processing is only efficient for collections that have a scala.collection.Stepper implementation which supports efficient splitting. For collections where this is the case, the stepper method has a return type marked with EfficientSplit.

Note: this method uses the boxed type java.lang.X instead of the primitive type scala.X to improve compatibility when using it in Java code (the Scala compiler emits C[Int] as C[Object] in bytecode due to scala/bug#4214). In Scala code, add import scala.jdk.StreamConverters._ and use the extension methods instead.

Source

Create a parallel Java LongStream for the keys of a Scala Map.

Note: parallel processing is only efficient for collections that have a scala.collection.Stepper implementation which supports efficient splitting. For collections where this is the case, the stepper method has a return type marked with EfficientSplit.

Note: this method uses the boxed type java.lang.X instead of the primitive type scala.X to improve compatibility when using it in Java code (the Scala compiler emits C[Int] as C[Object] in bytecode due to scala/bug#4214). In Scala code, add import scala.jdk.StreamConverters._ and use the extension methods instead.

Source
def asJavaParKeyStream[K, V](m: Map[K, V]): Stream[K]

Create a parallel Java Stream for the keys of a Scala Map.

Note: parallel processing is only efficient for collections that have a scala.collection.Stepper implementation which supports efficient splitting. For collections where this is the case, the stepper method has a return type marked with EfficientSplit.

Source

Create a parallel Java LongStream for a Scala collection.

Note: parallel processing is only efficient for collections that have a scala.collection.Stepper implementation which supports efficient splitting. For collections where this is the case, the stepper method has a return type marked with EfficientSplit.

Note: this method uses the boxed type java.lang.X instead of the primitive type scala.X to improve compatibility when using it in Java code (the Scala compiler emits C[Int] as C[Object] in bytecode due to scala/bug#4214). In Scala code, add import scala.jdk.StreamConverters._ and use the extension methods instead.

Source
def asJavaParStream[A](cc: IterableOnce[A]): Stream[A]

Create a parallel Java Stream for a Scala collection.

Note: parallel processing is only efficient for collections that have a scala.collection.Stepper implementation which supports efficient splitting. For collections where this is the case, the stepper method has a return type marked with EfficientSplit.

Source

Create a parallel Java DoubleStream for the values of a Scala Map.

Note: parallel processing is only efficient for collections that have a scala.collection.Stepper implementation which supports efficient splitting. For collections where this is the case, the stepper method has a return type marked with EfficientSplit.

Note: this method uses the boxed type java.lang.X instead of the primitive type scala.X to improve compatibility when using it in Java code (the Scala compiler emits C[Int] as C[Object] in bytecode due to scala/bug#4214). In Scala code, add import scala.jdk.StreamConverters._ and use the extension methods instead.

Source

Create a parallel Java DoubleStream for the values of a Scala Map.

Note: parallel processing is only efficient for collections that have a scala.collection.Stepper implementation which supports efficient splitting. For collections where this is the case, the stepper method has a return type marked with EfficientSplit.

Note: this method uses the boxed type java.lang.X instead of the primitive type scala.X to improve compatibility when using it in Java code (the Scala compiler emits C[Int] as C[Object] in bytecode due to scala/bug#4214). In Scala code, add import scala.jdk.StreamConverters._ and use the extension methods instead.

Source

Create a parallel Java IntStream for the values of a Scala Map.

Note: parallel processing is only efficient for collections that have a scala.collection.Stepper implementation which supports efficient splitting. For collections where this is the case, the stepper method has a return type marked with EfficientSplit.

Note: this method uses the boxed type java.lang.X instead of the primitive type scala.X to improve compatibility when using it in Java code (the Scala compiler emits C[Int] as C[Object] in bytecode due to scala/bug#4214). In Scala code, add import scala.jdk.StreamConverters._ and use the extension methods instead.

Source

Create a parallel Java IntStream for the values of a Scala Map.

Note: parallel processing is only efficient for collections that have a scala.collection.Stepper implementation which supports efficient splitting. For collections where this is the case, the stepper method has a return type marked with EfficientSplit.

Note: this method uses the boxed type java.lang.X instead of the primitive type scala.X to improve compatibility when using it in Java code (the Scala compiler emits C[Int] as C[Object] in bytecode due to scala/bug#4214). In Scala code, add import scala.jdk.StreamConverters._ and use the extension methods instead.

Source

Create a parallel Java IntStream for the values of a Scala Map.

Note: parallel processing is only efficient for collections that have a scala.collection.Stepper implementation which supports efficient splitting. For collections where this is the case, the stepper method has a return type marked with EfficientSplit.

Note: this method uses the boxed type java.lang.X instead of the primitive type scala.X to improve compatibility when using it in Java code (the Scala compiler emits C[Int] as C[Object] in bytecode due to scala/bug#4214). In Scala code, add import scala.jdk.StreamConverters._ and use the extension methods instead.

Source

Create a parallel Java IntStream for the values of a Scala Map.

Note: parallel processing is only efficient for collections that have a scala.collection.Stepper implementation which supports efficient splitting. For collections where this is the case, the stepper method has a return type marked with EfficientSplit.

Note: this method uses the boxed type java.lang.X instead of the primitive type scala.X to improve compatibility when using it in Java code (the Scala compiler emits C[Int] as C[Object] in bytecode due to scala/bug#4214). In Scala code, add import scala.jdk.StreamConverters._ and use the extension methods instead.

Source

Create a parallel Java LongStream for the values of a Scala Map.

Note: parallel processing is only efficient for collections that have a scala.collection.Stepper implementation which supports efficient splitting. For collections where this is the case, the stepper method has a return type marked with EfficientSplit.

Note: this method uses the boxed type java.lang.X instead of the primitive type scala.X to improve compatibility when using it in Java code (the Scala compiler emits C[Int] as C[Object] in bytecode due to scala/bug#4214). In Scala code, add import scala.jdk.StreamConverters._ and use the extension methods instead.

Source
def asJavaParValueStream[K, V](m: Map[K, V]): Stream[V]

Create a parallel Java Stream for the values of a Scala Map.

Note: parallel processing is only efficient for collections that have a scala.collection.Stepper implementation which supports efficient splitting. For collections where this is the case, the stepper method has a return type marked with EfficientSplit.

Source

Create a sequential Java DoubleStream for a Scala collection.

Note: this method uses the boxed type java.lang.X instead of the primitive type scala.X to improve compatibility when using it in Java code (the Scala compiler emits C[Int] as C[Object] in bytecode due to scala/bug#4214). In Scala code, add import scala.jdk.StreamConverters._ and use the extension methods instead.

Source

Create a sequential Java DoubleStream for a Scala collection.

Note: this method uses the boxed type java.lang.X instead of the primitive type scala.X to improve compatibility when using it in Java code (the Scala compiler emits C[Int] as C[Object] in bytecode due to scala/bug#4214). In Scala code, add import scala.jdk.StreamConverters._ and use the extension methods instead.

Source

Create a sequential Java IntStream for a Scala collection.

Note: this method uses the boxed type java.lang.X instead of the primitive type scala.X to improve compatibility when using it in Java code (the Scala compiler emits C[Int] as C[Object] in bytecode due to scala/bug#4214). In Scala code, add import scala.jdk.StreamConverters._ and use the extension methods instead.

Source

Create a sequential Java IntStream for a Scala collection.

Note: this method uses the boxed type java.lang.X instead of the primitive type scala.X to improve compatibility when using it in Java code (the Scala compiler emits C[Int] as C[Object] in bytecode due to scala/bug#4214). In Scala code, add import scala.jdk.StreamConverters._ and use the extension methods instead.

Source

Create a sequential Java IntStream for a Scala collection.

Note: this method uses the boxed type java.lang.X instead of the primitive type scala.X to improve compatibility when using it in Java code (the Scala compiler emits C[Int] as C[Object] in bytecode due to scala/bug#4214). In Scala code, add import scala.jdk.StreamConverters._ and use the extension methods instead.

Source

Create a sequential Java IntStream for a Scala collection.

Note: this method uses the boxed type java.lang.X instead of the primitive type scala.X to improve compatibility when using it in Java code (the Scala compiler emits C[Int] as C[Object] in bytecode due to scala/bug#4214). In Scala code, add import scala.jdk.StreamConverters._ and use the extension methods instead.

Source

Create a sequential Java DoubleStream for the keys of a Scala Map.

Note: this method uses the boxed type java.lang.X instead of the primitive type scala.X to improve compatibility when using it in Java code (the Scala compiler emits C[Int] as C[Object] in bytecode due to scala/bug#4214). In Scala code, add import scala.jdk.StreamConverters._ and use the extension methods instead.

Source

Create a sequential Java DoubleStream for the keys of a Scala Map.

Note: this method uses the boxed type java.lang.X instead of the primitive type scala.X to improve compatibility when using it in Java code (the Scala compiler emits C[Int] as C[Object] in bytecode due to scala/bug#4214). In Scala code, add import scala.jdk.StreamConverters._ and use the extension methods instead.

Source

Create a sequential Java IntStream for the keys of a Scala Map.

Note: this method uses the boxed type java.lang.X instead of the primitive type scala.X to improve compatibility when using it in Java code (the Scala compiler emits C[Int] as C[Object] in bytecode due to scala/bug#4214). In Scala code, add import scala.jdk.StreamConverters._ and use the extension methods instead.

Source

Create a sequential Java IntStream for the keys of a Scala Map.

Note: this method uses the boxed type java.lang.X instead of the primitive type scala.X to improve compatibility when using it in Java code (the Scala compiler emits C[Int] as C[Object] in bytecode due to scala/bug#4214). In Scala code, add import scala.jdk.StreamConverters._ and use the extension methods instead.

Source

Create a sequential Java IntStream for the keys of a Scala Map.

Note: this method uses the boxed type java.lang.X instead of the primitive type scala.X to improve compatibility when using it in Java code (the Scala compiler emits C[Int] as C[Object] in bytecode due to scala/bug#4214). In Scala code, add import scala.jdk.StreamConverters._ and use the extension methods instead.

Source

Create a sequential Java IntStream for the keys of a Scala Map.

Note: this method uses the boxed type java.lang.X instead of the primitive type scala.X to improve compatibility when using it in Java code (the Scala compiler emits C[Int] as C[Object] in bytecode due to scala/bug#4214). In Scala code, add import scala.jdk.StreamConverters._ and use the extension methods instead.

Source

Create a sequential Java LongStream for the keys of a Scala Map.

Note: this method uses the boxed type java.lang.X instead of the primitive type scala.X to improve compatibility when using it in Java code (the Scala compiler emits C[Int] as C[Object] in bytecode due to scala/bug#4214). In Scala code, add import scala.jdk.StreamConverters._ and use the extension methods instead.

Source
def asJavaSeqKeyStream[K, V](m: Map[K, V]): Stream[K]

Create a sequential Java Stream for the keys of a Scala Map.

Source

Create a sequential Java LongStream for a Scala collection.

Note: this method uses the boxed type java.lang.X instead of the primitive type scala.X to improve compatibility when using it in Java code (the Scala compiler emits C[Int] as C[Object] in bytecode due to scala/bug#4214). In Scala code, add import scala.jdk.StreamConverters._ and use the extension methods instead.

Source
def asJavaSeqStream[A](cc: IterableOnce[A]): Stream[A]

Create a sequential Java Stream for a Scala collection.

Source

Create a sequential Java DoubleStream for the values of a

Note: this method uses the boxed type java.lang.X instead of the primitive type scala.X to improve compatibility when using it in Java code (the Scala compiler emits C[Int] as C[Object] in bytecode due to scala/bug#4214). In Scala code, add import scala.jdk.StreamConverters._ and use the extension methods instead.

Source

Create a sequential Java DoubleStream for the values of a

Note: this method uses the boxed type java.lang.X instead of the primitive type scala.X to improve compatibility when using it in Java code (the Scala compiler emits C[Int] as C[Object] in bytecode due to scala/bug#4214). In Scala code, add import scala.jdk.StreamConverters._ and use the extension methods instead.

Source

Create a sequential Java IntStream for the values of a

Note: this method uses the boxed type java.lang.X instead of the primitive type scala.X to improve compatibility when using it in Java code (the Scala compiler emits C[Int] as C[Object] in bytecode due to scala/bug#4214). In Scala code, add import scala.jdk.StreamConverters._ and use the extension methods instead.

Source

Create a sequential Java IntStream for the values of a

Note: this method uses the boxed type java.lang.X instead of the primitive type scala.X to improve compatibility when using it in Java code (the Scala compiler emits C[Int] as C[Object] in bytecode due to scala/bug#4214). In Scala code, add import scala.jdk.StreamConverters._ and use the extension methods instead.

Source

Create a sequential Java IntStream for the values of a

Note: this method uses the boxed type java.lang.X instead of the primitive type scala.X to improve compatibility when using it in Java code (the Scala compiler emits C[Int] as C[Object] in bytecode due to scala/bug#4214). In Scala code, add import scala.jdk.StreamConverters._ and use the extension methods instead.

Source

Create a sequential Java IntStream for the values of a

Note: this method uses the boxed type java.lang.X instead of the primitive type scala.X to improve compatibility when using it in Java code (the Scala compiler emits C[Int] as C[Object] in bytecode due to scala/bug#4214). In Scala code, add import scala.jdk.StreamConverters._ and use the extension methods instead.

Source

Create a sequential Java LongStream for the values of a

Note: this method uses the boxed type java.lang.X instead of the primitive type scala.X to improve compatibility when using it in Java code (the Scala compiler emits C[Int] as C[Object] in bytecode due to scala/bug#4214). In Scala code, add import scala.jdk.StreamConverters._ and use the extension methods instead.

Source
def asJavaSeqValueStream[K, V](m: Map[K, V]): Stream[V]

Create a sequential Java Stream for the values of a Scala Map.

© 2002-2022 EPFL, with contributions from Lightbend.
Licensed under the Apache License, Version 2.0.
https://scala-lang.org/api/3.2.0/scala/jdk/javaapi/StreamConverters$.html