Remove java.util references from the common code

This commit is contained in:
Ilya Gorbunov
2016-11-08 06:25:49 +03:00
parent 63535393e7
commit fae5c88f22
14 changed files with 3 additions and 17 deletions
-1
View File
@@ -16,7 +16,6 @@
package kotlin.collections
import java.util.Comparator
import kotlin.comparisons.naturalOrder
@library("copyToArray")
@@ -9,7 +9,6 @@ package kotlin.collections
//
import kotlin.comparisons.*
import java.util.*
/**
* Returns a [List] that wraps the original array.
@@ -9,7 +9,6 @@ package kotlin.collections
//
import kotlin.comparisons.*
import java.util.*
/**
* Returns 1st *element* from the collection.
@@ -9,7 +9,6 @@ package kotlin.collections
//
import kotlin.comparisons.*
import java.util.*
/**
* Returns 1st *element* from the collection.
-1
View File
@@ -9,7 +9,6 @@ package kotlin.collections
//
import kotlin.comparisons.*
import java.util.*
/**
* Returns a [List] containing all key-value pairs.
@@ -9,7 +9,6 @@ package kotlin.ranges
//
import kotlin.comparisons.*
import java.util.*
/**
* Checks if the specified [value] belongs to this range.
@@ -9,7 +9,6 @@ package kotlin.sequences
//
import kotlin.comparisons.*
import java.util.*
/**
* Returns `true` if [element] is found in the sequence.
-1
View File
@@ -9,7 +9,6 @@ package kotlin.collections
//
import kotlin.comparisons.*
import java.util.*
/**
* Returns a set containing all elements of the original set except the given [element].
@@ -9,7 +9,6 @@ package kotlin.text
//
import kotlin.comparisons.*
import java.util.*
/**
* Returns a character at the given [index] or throws an [IndexOutOfBoundsException] if the [index] is out of bounds of this char sequence.
@@ -17,8 +17,6 @@
@file:kotlin.jvm.JvmName("CollectionsKt")
package kotlin.collections
import java.util.*
/**
* Given an [iterator] function constructs an [Iterable] instance that returns values through the [Iterator]
* provided by that function.
@@ -17,8 +17,6 @@
package kotlin.comparisons
import java.util.Comparator
/**
* Compares two values using the specified functions [selectors] to calculate the result of the comparison.
* The functions are called sequentially, receive the given values [a] and [b] and return [Comparable]
@@ -17,7 +17,6 @@
package test.collections
import org.junit.Test
import java.util.*
import kotlin.test.*
fun <T> iterableOf(vararg items: T): Iterable<T> = Iterable { items.iterator() }
@@ -38,7 +38,7 @@ class JsCollectionsTest {
}
@test fun arrayListCapacity() {
val list = java.util.ArrayList<Any>(20)
val list = ArrayList<Any>(20)
list.ensureCapacity(100)
list.trimToSize()
assertTrue(list.isEmpty())
@@ -81,8 +81,8 @@ private fun List<ConcreteFunction>.writeTo(file: File, sourceFile: SourceFile) {
writer.append("@file:kotlin.jvm.JvmName(\"${sourceFile.jvmClassName}\")\n\n")
writer.append("package ${sourceFile.packageName ?: "kotlin"}\n\n")
writer.append("$COMMON_AUTOGENERATED_WARNING\n\n")
writer.append("import kotlin.comparisons.*\n")
writer.append("import java.util.*\n\n")
writer.append("import kotlin.comparisons.*\n\n")
for (f in this) {
f.textBuilder(writer)
}