public class PrimitiveIteratorConverters
extends java.lang.Object
scala.Iterator
to the set of
java.util.PrimitiveIterator
classes.
Scala's Iterator
is generic, as is its java.util
counterpart. However,
java.util.PrimitiveIterator
offers three manually-specialized variants of
Iterator
: OfDouble
, OfInt
, and OfLong
. This class provides
.asPrimitive
extension methods for Scala and Java iterators to present
the generic versions as the specialized version.
Example usage:
import scala.compat.java8.PrimitiveIteratorConverters._
val it = Iterator(1.0, 2.0, math.Pi)
val jpid = it.asPrimitive // PrimitiveIterator.OfDouble
Modifier and Type | Class and Description |
---|---|
static class |
PrimitiveIteratorConverters.RichIteratorToPrimitives<A>
Provides conversions from Scala `Iterator` to manually specialized `PrimitiveIterator` variants, when available
|
static class |
PrimitiveIteratorConverters.RichIteratorToPrimitives$ |
static class |
PrimitiveIteratorConverters.RichJavaIteratorToPrimitives<A>
Provides conversions from Java `Iterator` to manually specialized `PrimitiveIterator` variants, when available
|
static class |
PrimitiveIteratorConverters.RichJavaIteratorToPrimitives$ |
static class |
PrimitiveIteratorConverters.SpecializerOfIterators<A,That>
Type class implementing conversion from generic `Option` or `Optional` to manually specialized variants.
|
Constructor and Description |
---|
PrimitiveIteratorConverters() |
Modifier and Type | Method and Description |
---|---|
static PrimitiveIteratorConverters.SpecializerOfIterators<java.lang.Object,java.util.PrimitiveIterator.OfDouble> |
specializer_PrimitiveIteratorDouble()
Implementation of wrapping of `java.util.Iterator[Double]` or `scala.collection.Iterator[Double]` as a `java.util.PrimitiveIterator.OfDouble`
|
static PrimitiveIteratorConverters.SpecializerOfIterators<java.lang.Object,java.util.PrimitiveIterator.OfInt> |
specializer_PrimitiveIteratorInt()
Implementation of wrapping of `java.util.Iterator[Int]` or `scala.collection.Iterator[Int]` as a `java.util.PrimitiveIterator.OfInt`
|
static PrimitiveIteratorConverters.SpecializerOfIterators<java.lang.Object,java.util.PrimitiveIterator.OfLong> |
specializer_PrimitiveIteratorLong()
Implementation of wrapping of `java.util.Iterator[Long]` or `scala.collection.Iterator[Long]` as a `java.util.PrimitiveIterator.OfLong`
|
public static PrimitiveIteratorConverters.SpecializerOfIterators<java.lang.Object,java.util.PrimitiveIterator.OfDouble> specializer_PrimitiveIteratorDouble()
public static PrimitiveIteratorConverters.SpecializerOfIterators<java.lang.Object,java.util.PrimitiveIterator.OfInt> specializer_PrimitiveIteratorInt()
public static PrimitiveIteratorConverters.SpecializerOfIterators<java.lang.Object,java.util.PrimitiveIterator.OfLong> specializer_PrimitiveIteratorLong()