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 | Field and Description |
---|---|
static PrimitiveIteratorConverters$ |
MODULE$
Static reference to the singleton instance of this Scala object.
|
Constructor and Description |
---|
PrimitiveIteratorConverters$() |
Modifier and Type | Method and Description |
---|---|
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`
|
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`
|
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 final PrimitiveIteratorConverters$ MODULE$
public PrimitiveIteratorConverters.SpecializerOfIterators<java.lang.Object,java.util.PrimitiveIterator.OfDouble> specializer_PrimitiveIteratorDouble()
public PrimitiveIteratorConverters.SpecializerOfIterators<java.lang.Object,java.util.PrimitiveIterator.OfInt> specializer_PrimitiveIteratorInt()
public PrimitiveIteratorConverters.SpecializerOfIterators<java.lang.Object,java.util.PrimitiveIterator.OfLong> specializer_PrimitiveIteratorLong()