wei-k.iarray_2.13.0-M2.0.4.1.source-code.IArrayIterator.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of iarray_2.13.0-M2 Show documentation
Show all versions of iarray_2.13.0-M2 Show documentation
Immutable array wrapper. does not use ClassTag. scalaz friendly
The newest version!
package iarray
private final class IArrayIterator[A](array: Array[AnyRef]) extends Iterator[A] {
private[this] var i = 0
def hasNext = i < array.length
def next(): A =
if (hasNext) {
val r = array(i).asInstanceOf[A]
i += 1
r
} else Iterator.empty.next
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy