← Docs
kotlin-stdlib / kotlin.collections / AbstractIterator / computeNext

computeNext

Common
JVM
JS
Native
1.0
protected abstract fun computeNext ( )
(source)

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

Stay in touch:
  • Contributing to Kotlin
  • Releases
  • Press Kit
  • Security
  • Blog
  • Issue Tracker
  • Brand assets
  • Careers
Supported and developed by JetBrains .
Kotlin™ is protected under the Kotlin Foundation
and licensed under the Apache 2 license .