KT-274 stdlib part and commented test. Still require frontend test
This commit is contained in:
@@ -7,6 +7,26 @@ import java.util.HashSet
|
||||
import java.util.LinkedHashSet
|
||||
import java.util.TreeSet
|
||||
|
||||
/*
|
||||
Helper to make jet.Iterator usable in for
|
||||
*/
|
||||
inline fun <T> jet.Iterator<T>.iterator() = this
|
||||
|
||||
/*
|
||||
Helper to make java.util.Iterator usable in for
|
||||
*/
|
||||
inline fun <T> java.util.Iterator<T>.iterator() = this
|
||||
|
||||
/*
|
||||
Helper to make java.util.Enumeration usable in for
|
||||
*/
|
||||
inline fun <T> java.util.Enumeration<T>.iterator() = object: Iterator<T> {
|
||||
override val hasNext: Boolean
|
||||
get() = hasMoreElements()
|
||||
|
||||
override fun next() = nextElement()
|
||||
}
|
||||
|
||||
/*
|
||||
* Extension functions on the standard Kotlin types to behave like the java.lang.* and java.util.* collections
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user