for consistency, moved extension functions on iterator/iterable/collection to the kotlin package rather than being split across kotlin and kotlin.util. Once intrinsic collections are here we could consider moving the java.util extension functions into kotlin.java.util

This commit is contained in:
James Strachan
2012-03-26 08:58:50 +01:00
parent dd9c36387c
commit 3a4ed6a85f
15 changed files with 17 additions and 22 deletions
@@ -1,13 +1,13 @@
package kotlin.jdbc
import java.sql. *
import java.util.List
import kotlin.util.arrayList
import java.sql.*
import java.util.ArrayList
import java.util.Collection
import java.util.List
/**
* Creates an iterator through a [[ResultSet]]
*/
* Creates an iterator through a [[ResultSet]]
*/
fun ResultSet.iterator() : Iterator<ResultSet> {
val rs = this
return object : Iterator<ResultSet>{
@@ -32,7 +32,7 @@ fun ResultSet.get(columnName: String): Any? = this.getObject(columnName)
* Maps the collection of rows to some value
*/
fun <T> ResultSet.map(fn: (ResultSet) -> T) : List<T> {
val answer = arrayList<T>()
val answer = ArrayList<T>()
mapTo(answer, fn)
return answer
}