mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-17 15:54:03 +00:00
14 lines
292 B
Kotlin
14 lines
292 B
Kotlin
import java.util.Enumeration
|
|
|
|
fun <T> java.util.Enumeration<T>.iterator() = object : Iterator<T> {
|
|
public override fun hasNext(): Boolean = hasMoreElements()
|
|
|
|
public override fun next() = nextElement()
|
|
}
|
|
|
|
fun a(e : java.util.Enumeration<Int>) {
|
|
for (i in e) {
|
|
i : Int
|
|
}
|
|
}
|