W3cubDocs

/Kotlin

computeNext

Platform and version requirements: JVM (1.0), JS (1.0), Native (1.0)
protected abstract fun computeNext()

Computes the next item in the iterator.

This callback method should call one of these two methods:

  • setNext with the next value of the iteration
  • done to indicate there are no more elements

Failure to call either method will result in the iteration terminating with a failed state

© 2010–2020 JetBrains s.r.o. and Kotlin Programming Language contributors
Licensed under the Apache License, Version 2.0.
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-abstract-iterator/compute-next.html