Drop deprecated toGenerator and toLinkedList (again).
This commit is contained in:
@@ -5707,78 +5707,6 @@ public fun ShortArray.toHashSet(): HashSet<Short> {
|
||||
return toCollection(HashSet<Short>(mapCapacity(size)))
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a [LinkedList] containing all elements.
|
||||
*/
|
||||
@Deprecated("Use toCollection(LinkedList()) instead.", ReplaceWith("toCollection(LinkedList())"))
|
||||
public fun <T> Array<out T>.toLinkedList(): LinkedList<T> {
|
||||
return toCollection(LinkedList())
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a [LinkedList] containing all elements.
|
||||
*/
|
||||
@Deprecated("Use toCollection(LinkedList()) instead.", ReplaceWith("toCollection(LinkedList())"))
|
||||
public fun BooleanArray.toLinkedList(): LinkedList<Boolean> {
|
||||
return toCollection(LinkedList())
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a [LinkedList] containing all elements.
|
||||
*/
|
||||
@Deprecated("Use toCollection(LinkedList()) instead.", ReplaceWith("toCollection(LinkedList())"))
|
||||
public fun ByteArray.toLinkedList(): LinkedList<Byte> {
|
||||
return toCollection(LinkedList())
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a [LinkedList] containing all elements.
|
||||
*/
|
||||
@Deprecated("Use toCollection(LinkedList()) instead.", ReplaceWith("toCollection(LinkedList())"))
|
||||
public fun CharArray.toLinkedList(): LinkedList<Char> {
|
||||
return toCollection(LinkedList())
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a [LinkedList] containing all elements.
|
||||
*/
|
||||
@Deprecated("Use toCollection(LinkedList()) instead.", ReplaceWith("toCollection(LinkedList())"))
|
||||
public fun DoubleArray.toLinkedList(): LinkedList<Double> {
|
||||
return toCollection(LinkedList())
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a [LinkedList] containing all elements.
|
||||
*/
|
||||
@Deprecated("Use toCollection(LinkedList()) instead.", ReplaceWith("toCollection(LinkedList())"))
|
||||
public fun FloatArray.toLinkedList(): LinkedList<Float> {
|
||||
return toCollection(LinkedList())
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a [LinkedList] containing all elements.
|
||||
*/
|
||||
@Deprecated("Use toCollection(LinkedList()) instead.", ReplaceWith("toCollection(LinkedList())"))
|
||||
public fun IntArray.toLinkedList(): LinkedList<Int> {
|
||||
return toCollection(LinkedList())
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a [LinkedList] containing all elements.
|
||||
*/
|
||||
@Deprecated("Use toCollection(LinkedList()) instead.", ReplaceWith("toCollection(LinkedList())"))
|
||||
public fun LongArray.toLinkedList(): LinkedList<Long> {
|
||||
return toCollection(LinkedList())
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a [LinkedList] containing all elements.
|
||||
*/
|
||||
@Deprecated("Use toCollection(LinkedList()) instead.", ReplaceWith("toCollection(LinkedList())"))
|
||||
public fun ShortArray.toLinkedList(): LinkedList<Short> {
|
||||
return toCollection(LinkedList())
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a [List] containing all elements.
|
||||
*/
|
||||
|
||||
@@ -1050,14 +1050,6 @@ public fun <T> Iterable<T>.toHashSet(): HashSet<T> {
|
||||
return toCollection(HashSet<T>(mapCapacity(collectionSizeOrDefault(12))))
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a [LinkedList] containing all elements.
|
||||
*/
|
||||
@Deprecated("Use toCollection(LinkedList()) instead.", ReplaceWith("toCollection(LinkedList())"))
|
||||
public fun <T> Iterable<T>.toLinkedList(): LinkedList<T> {
|
||||
return toCollection(LinkedList())
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a [List] containing all elements.
|
||||
*/
|
||||
|
||||
@@ -508,14 +508,6 @@ public fun <T> Sequence<T>.toHashSet(): HashSet<T> {
|
||||
return toCollection(HashSet<T>())
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a [LinkedList] containing all elements.
|
||||
*/
|
||||
@Deprecated("Use toCollection(LinkedList()) instead.", ReplaceWith("toCollection(LinkedList())"))
|
||||
public fun <T> Sequence<T>.toLinkedList(): LinkedList<T> {
|
||||
return toCollection(LinkedList())
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a [List] containing all elements.
|
||||
*/
|
||||
|
||||
@@ -783,14 +783,6 @@ public fun String.toHashSet(): HashSet<Char> {
|
||||
return toCollection(HashSet<Char>(mapCapacity(length)))
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a [LinkedList] containing all elements.
|
||||
*/
|
||||
@Deprecated("Use toCollection(LinkedList()) instead.", ReplaceWith("toCollection(LinkedList())"))
|
||||
public fun String.toLinkedList(): LinkedList<Char> {
|
||||
return toCollection(LinkedList())
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a [List] containing all characters.
|
||||
*/
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
package kotlin
|
||||
|
||||
/**
|
||||
* Converts a function that takes one argument and returns a value of the same type to a generator function.
|
||||
* The generator function calls this function, passing to it either [initialValue] on the first iteration
|
||||
* or the previously returned value on subsequent iterations, and returns the returned value.
|
||||
*/
|
||||
@Deprecated("This function will be removed soon. If you need generator function to create a sequence, use the 'sequence' function instead.")
|
||||
public fun <T: Any> Function1<T, T?>.toGenerator(initialValue: T): Function0<T?> {
|
||||
var nextValue: T? = initialValue
|
||||
return {
|
||||
nextValue?.let { result ->
|
||||
nextValue = this@toGenerator(result)
|
||||
result
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -110,13 +110,6 @@ fun snapshots(): List<GenericFunction> {
|
||||
body { "return this.toArrayList()" }
|
||||
}
|
||||
|
||||
templates add f("toLinkedList()") {
|
||||
include(Strings)
|
||||
doc { "Returns a [LinkedList] containing all elements." }
|
||||
returns("LinkedList<T>")
|
||||
deprecate { Deprecation("Use toCollection(LinkedList()) instead.", replaceWith = "toCollection(LinkedList())") }
|
||||
}
|
||||
|
||||
templates add f("toMap(selector: (T) -> K)") {
|
||||
inline(true)
|
||||
deprecate(Strings) { forBinaryCompatibility }
|
||||
|
||||
Reference in New Issue
Block a user