All Downloads are FREE. Search and download functionalities are using the official Maven repository.

wei-k.iarray_2.11.0.4.0.source-code.IArrayIterator.scala Maven / Gradle / Ivy

There is a newer version: 0.7.1
Show 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 - 2024 Weber Informatics LLC | Privacy Policy