← Docs
kotlin-stdlib / kotlin.collections / MutableListIterator / set

set

Common
JVM
JS
Native
1.0
abstract fun set ( element : T )
(Common source) (Native source)

Replaces the last element returned by next or previous with the specified element element .

Exceptions

IllegalStateException - if neither next nor previous has not been called yet, or the most recent next or previous call has already been followed by a remove or add call.

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 .