From 339e6391357e06f1d7092704c3ab03d29cac2486 Mon Sep 17 00:00:00 2001 From: Mikhael Bogdanov Date: Wed, 20 Nov 2013 12:10:35 +0400 Subject: [PATCH] Stdlib regenerated --- libraries/stdlib/src/generated/_Arrays.kt | 34 +++++++-------- .../stdlib/src/generated/_BooleanArrays.kt | 28 ++++++------- libraries/stdlib/src/generated/_ByteArrays.kt | 28 ++++++------- libraries/stdlib/src/generated/_CharArrays.kt | 28 ++++++------- .../stdlib/src/generated/_Collections.kt | 2 +- .../stdlib/src/generated/_DoubleArrays.kt | 28 ++++++------- .../stdlib/src/generated/_FloatArrays.kt | 28 ++++++------- libraries/stdlib/src/generated/_IntArrays.kt | 28 ++++++------- libraries/stdlib/src/generated/_Iterables.kt | 34 +++++++-------- libraries/stdlib/src/generated/_Iterators.kt | 42 +++++++++---------- libraries/stdlib/src/generated/_LongArrays.kt | 28 ++++++------- .../stdlib/src/generated/_ShortArrays.kt | 28 ++++++------- 12 files changed, 168 insertions(+), 168 deletions(-) diff --git a/libraries/stdlib/src/generated/_Arrays.kt b/libraries/stdlib/src/generated/_Arrays.kt index ad1ab99481d..338c54bb665 100644 --- a/libraries/stdlib/src/generated/_Arrays.kt +++ b/libraries/stdlib/src/generated/_Arrays.kt @@ -28,7 +28,7 @@ public inline fun Array.any(predicate: (T) -> Boolean) : Boolean { * If a collection could be huge you can specify a non-negative value of *limit* which will only show a subset of the collection then it will * a special *truncated* separator (which defaults to "..." */ -public inline fun Array.appendString(buffer: Appendable, separator: String = ", ", prefix: String ="", postfix: String = "", limit: Int = -1, truncated: String = "...") : Unit { +public fun Array.appendString(buffer: Appendable, separator: String = ", ", prefix: String ="", postfix: String = "", limit: Int = -1, truncated: String = "...") : Unit { buffer.append(prefix) var count = 0 for (element in this) { @@ -54,7 +54,7 @@ public inline fun Array.count(predicate: (T) -> Boolean) : Int { /** * Returns a list containing everything but the first *n* elements */ -public inline fun Array.drop(n: Int) : List { +public fun Array.drop(n: Int) : List { return dropWhile(countTo(n)) } @@ -98,14 +98,14 @@ public inline fun Array.filterNot(predicate: (T) -> Boolean) : List Array.filterNotNull() : List { +public fun Array.filterNotNull() : List { return filterNotNullTo>(ArrayList()) } /** * Filters all non-*null* elements into the given list */ -public inline fun > Array.filterNotNullTo(result: C) : C { +public fun > Array.filterNotNullTo(result: C) : C { for (element in this) if (element != null) result.add(element) return result } @@ -203,7 +203,7 @@ public inline fun Array.groupByTo(result: MutableMap Array.makeString(separator: String = ", ", prefix: String = "", postfix: String = "", limit: Int = -1, truncated: String = "...") : String { +public fun Array.makeString(separator: String = ", ", prefix: String = "", postfix: String = "", limit: Int = -1, truncated: String = "...") : String { val buffer = StringBuilder() appendString(buffer, separator, prefix, postfix, limit, truncated) return buffer.toString() @@ -309,14 +309,14 @@ public inline fun Array.partition(predicate: (T) -> Boolean) : Pair Array.plus(collection: Iterable) : List { +public fun Array.plus(collection: Iterable) : List { return plus(collection.iterator()) } /** * Creates an [[Iterator]] which iterates over this iterator then the given element at the end */ -public inline fun Array.plus(element: T) : List { +public fun Array.plus(element: T) : List { val answer = ArrayList() toCollection(answer) answer.add(element) @@ -326,7 +326,7 @@ public inline fun Array.plus(element: T) : List { /** * Creates an [[Iterator]] which iterates over this iterator then the following iterator */ -public inline fun Array.plus(iterator: Iterator) : List { +public fun Array.plus(iterator: Iterator) : List { val answer = ArrayList() toCollection(answer) for (element in iterator) { @@ -374,7 +374,7 @@ public inline fun Array.reduceRight(operation: (T, T) -> T) : T { /** * Returns a original Iterable containing all the non-*null* elements, throwing an [[IllegalArgumentException]] if there are any null elements */ -public inline fun Array.requireNoNulls() : Array { +public fun Array.requireNoNulls() : Array { for (element in this) { if (element == null) { throw IllegalArgumentException("null element found in $this") @@ -386,7 +386,7 @@ public inline fun Array.requireNoNulls() : Array { /** * Reverses the order the elements into a list */ -public inline fun Array.reverse() : List { +public fun Array.reverse() : List { val list = toCollection(ArrayList()) Collections.reverse(list) return list @@ -410,7 +410,7 @@ public inline fun > Array.sortBy(f: (T) -> R) : List< /** * Returns a list containing the first *n* elements */ -public inline fun Array.take(n: Int) : List { +public fun Array.take(n: Int) : List { return takeWhile(countTo(n)) } @@ -432,7 +432,7 @@ public inline fun > Array.takeWhileTo(resul /** * Copies all elements into the given collection */ -public inline fun > Array.toCollection(result: C) : C { +public fun > Array.toCollection(result: C) : C { for (element in this) result.add(element) return result } @@ -440,35 +440,35 @@ public inline fun > Array.toCollection(resu /** * Copies all elements into a [[LinkedList]] */ -public inline fun Array.toLinkedList() : LinkedList { +public fun Array.toLinkedList() : LinkedList { return toCollection(LinkedList()) } /** * Copies all elements into a [[List]] */ -public inline fun Array.toList() : List { +public fun Array.toList() : List { return toCollection(ArrayList()) } /** * Copies all elements into a [[Set]] */ -public inline fun Array.toSet() : Set { +public fun Array.toSet() : Set { return toCollection(LinkedHashSet()) } /** * Copies all elements into a [[SortedSet]] */ -public inline fun Array.toSortedSet() : SortedSet { +public fun Array.toSortedSet() : SortedSet { return toCollection(TreeSet()) } /** * Returns an iterator of Pairs(index, data) */ -public inline fun Array.withIndices() : Iterator> { +public fun Array.withIndices() : Iterator> { return IndexIterator(iterator()) } diff --git a/libraries/stdlib/src/generated/_BooleanArrays.kt b/libraries/stdlib/src/generated/_BooleanArrays.kt index 8a11421436f..0b061b1b506 100644 --- a/libraries/stdlib/src/generated/_BooleanArrays.kt +++ b/libraries/stdlib/src/generated/_BooleanArrays.kt @@ -28,7 +28,7 @@ public inline fun BooleanArray.any(predicate: (Boolean) -> Boolean) : Boolean { * If a collection could be huge you can specify a non-negative value of *limit* which will only show a subset of the collection then it will * a special *truncated* separator (which defaults to "..." */ -public inline fun BooleanArray.appendString(buffer: Appendable, separator: String = ", ", prefix: String ="", postfix: String = "", limit: Int = -1, truncated: String = "...") : Unit { +public fun BooleanArray.appendString(buffer: Appendable, separator: String = ", ", prefix: String ="", postfix: String = "", limit: Int = -1, truncated: String = "...") : Unit { buffer.append(prefix) var count = 0 for (element in this) { @@ -54,7 +54,7 @@ public inline fun BooleanArray.count(predicate: (Boolean) -> Boolean) : Int { /** * Returns a list containing everything but the first *n* elements */ -public inline fun BooleanArray.drop(n: Int) : List { +public fun BooleanArray.drop(n: Int) : List { return dropWhile(countTo(n)) } @@ -202,7 +202,7 @@ public fun BooleanArray.isNotEmpty() : Boolean { * If a collection could be huge you can specify a non-negative value of *limit* which will only show a subset of the collection then it will * a special *truncated* separator (which defaults to "..." */ -public inline fun BooleanArray.makeString(separator: String = ", ", prefix: String = "", postfix: String = "", limit: Int = -1, truncated: String = "...") : String { +public fun BooleanArray.makeString(separator: String = ", ", prefix: String = "", postfix: String = "", limit: Int = -1, truncated: String = "...") : String { val buffer = StringBuilder() appendString(buffer, separator, prefix, postfix, limit, truncated) return buffer.toString() @@ -282,14 +282,14 @@ public inline fun BooleanArray.partition(predicate: (Boolean) -> Boolean) : Pair /** * Creates an [[Iterator]] which iterates over this iterator then the following collection */ -public inline fun BooleanArray.plus(collection: Iterable) : List { +public fun BooleanArray.plus(collection: Iterable) : List { return plus(collection.iterator()) } /** * Creates an [[Iterator]] which iterates over this iterator then the given element at the end */ -public inline fun BooleanArray.plus(element: Boolean) : List { +public fun BooleanArray.plus(element: Boolean) : List { val answer = ArrayList() toCollection(answer) answer.add(element) @@ -299,7 +299,7 @@ public inline fun BooleanArray.plus(element: Boolean) : List { /** * Creates an [[Iterator]] which iterates over this iterator then the following iterator */ -public inline fun BooleanArray.plus(iterator: Iterator) : List { +public fun BooleanArray.plus(iterator: Iterator) : List { val answer = ArrayList() toCollection(answer) for (element in iterator) { @@ -347,7 +347,7 @@ public inline fun BooleanArray.reduceRight(operation: (Boolean, Boolean) -> Bool /** * Reverses the order the elements into a list */ -public inline fun BooleanArray.reverse() : List { +public fun BooleanArray.reverse() : List { val list = toCollection(ArrayList()) Collections.reverse(list) return list @@ -371,7 +371,7 @@ public inline fun > BooleanArray.sortBy(f: (Boolean) -> R) : Li /** * Returns a list containing the first *n* elements */ -public inline fun BooleanArray.take(n: Int) : List { +public fun BooleanArray.take(n: Int) : List { return takeWhile(countTo(n)) } @@ -393,7 +393,7 @@ public inline fun > BooleanArray.takeWhileTo(re /** * Copies all elements into the given collection */ -public inline fun > BooleanArray.toCollection(result: C) : C { +public fun > BooleanArray.toCollection(result: C) : C { for (element in this) result.add(element) return result } @@ -401,35 +401,35 @@ public inline fun > BooleanArray.toCollection(r /** * Copies all elements into a [[LinkedList]] */ -public inline fun BooleanArray.toLinkedList() : LinkedList { +public fun BooleanArray.toLinkedList() : LinkedList { return toCollection(LinkedList()) } /** * Copies all elements into a [[List]] */ -public inline fun BooleanArray.toList() : List { +public fun BooleanArray.toList() : List { return toCollection(ArrayList()) } /** * Copies all elements into a [[Set]] */ -public inline fun BooleanArray.toSet() : Set { +public fun BooleanArray.toSet() : Set { return toCollection(LinkedHashSet()) } /** * Copies all elements into a [[SortedSet]] */ -public inline fun BooleanArray.toSortedSet() : SortedSet { +public fun BooleanArray.toSortedSet() : SortedSet { return toCollection(TreeSet()) } /** * Returns an iterator of Pairs(index, data) */ -public inline fun BooleanArray.withIndices() : Iterator> { +public fun BooleanArray.withIndices() : Iterator> { return IndexIterator(iterator()) } diff --git a/libraries/stdlib/src/generated/_ByteArrays.kt b/libraries/stdlib/src/generated/_ByteArrays.kt index d7c9dc54e90..543fa827a6a 100644 --- a/libraries/stdlib/src/generated/_ByteArrays.kt +++ b/libraries/stdlib/src/generated/_ByteArrays.kt @@ -28,7 +28,7 @@ public inline fun ByteArray.any(predicate: (Byte) -> Boolean) : Boolean { * If a collection could be huge you can specify a non-negative value of *limit* which will only show a subset of the collection then it will * a special *truncated* separator (which defaults to "..." */ -public inline fun ByteArray.appendString(buffer: Appendable, separator: String = ", ", prefix: String ="", postfix: String = "", limit: Int = -1, truncated: String = "...") : Unit { +public fun ByteArray.appendString(buffer: Appendable, separator: String = ", ", prefix: String ="", postfix: String = "", limit: Int = -1, truncated: String = "...") : Unit { buffer.append(prefix) var count = 0 for (element in this) { @@ -54,7 +54,7 @@ public inline fun ByteArray.count(predicate: (Byte) -> Boolean) : Int { /** * Returns a list containing everything but the first *n* elements */ -public inline fun ByteArray.drop(n: Int) : List { +public fun ByteArray.drop(n: Int) : List { return dropWhile(countTo(n)) } @@ -202,7 +202,7 @@ public fun ByteArray.isNotEmpty() : Boolean { * If a collection could be huge you can specify a non-negative value of *limit* which will only show a subset of the collection then it will * a special *truncated* separator (which defaults to "..." */ -public inline fun ByteArray.makeString(separator: String = ", ", prefix: String = "", postfix: String = "", limit: Int = -1, truncated: String = "...") : String { +public fun ByteArray.makeString(separator: String = ", ", prefix: String = "", postfix: String = "", limit: Int = -1, truncated: String = "...") : String { val buffer = StringBuilder() appendString(buffer, separator, prefix, postfix, limit, truncated) return buffer.toString() @@ -308,14 +308,14 @@ public inline fun ByteArray.partition(predicate: (Byte) -> Boolean) : Pair) : List { +public fun ByteArray.plus(collection: Iterable) : List { return plus(collection.iterator()) } /** * Creates an [[Iterator]] which iterates over this iterator then the given element at the end */ -public inline fun ByteArray.plus(element: Byte) : List { +public fun ByteArray.plus(element: Byte) : List { val answer = ArrayList() toCollection(answer) answer.add(element) @@ -325,7 +325,7 @@ public inline fun ByteArray.plus(element: Byte) : List { /** * Creates an [[Iterator]] which iterates over this iterator then the following iterator */ -public inline fun ByteArray.plus(iterator: Iterator) : List { +public fun ByteArray.plus(iterator: Iterator) : List { val answer = ArrayList() toCollection(answer) for (element in iterator) { @@ -373,7 +373,7 @@ public inline fun ByteArray.reduceRight(operation: (Byte, Byte) -> Byte) : Byte /** * Reverses the order the elements into a list */ -public inline fun ByteArray.reverse() : List { +public fun ByteArray.reverse() : List { val list = toCollection(ArrayList()) Collections.reverse(list) return list @@ -397,7 +397,7 @@ public inline fun > ByteArray.sortBy(f: (Byte) -> R) : List { +public fun ByteArray.take(n: Int) : List { return takeWhile(countTo(n)) } @@ -419,7 +419,7 @@ public inline fun > ByteArray.takeWhileTo(result: /** * Copies all elements into the given collection */ -public inline fun > ByteArray.toCollection(result: C) : C { +public fun > ByteArray.toCollection(result: C) : C { for (element in this) result.add(element) return result } @@ -427,35 +427,35 @@ public inline fun > ByteArray.toCollection(result: /** * Copies all elements into a [[LinkedList]] */ -public inline fun ByteArray.toLinkedList() : LinkedList { +public fun ByteArray.toLinkedList() : LinkedList { return toCollection(LinkedList()) } /** * Copies all elements into a [[List]] */ -public inline fun ByteArray.toList() : List { +public fun ByteArray.toList() : List { return toCollection(ArrayList()) } /** * Copies all elements into a [[Set]] */ -public inline fun ByteArray.toSet() : Set { +public fun ByteArray.toSet() : Set { return toCollection(LinkedHashSet()) } /** * Copies all elements into a [[SortedSet]] */ -public inline fun ByteArray.toSortedSet() : SortedSet { +public fun ByteArray.toSortedSet() : SortedSet { return toCollection(TreeSet()) } /** * Returns an iterator of Pairs(index, data) */ -public inline fun ByteArray.withIndices() : Iterator> { +public fun ByteArray.withIndices() : Iterator> { return IndexIterator(iterator()) } diff --git a/libraries/stdlib/src/generated/_CharArrays.kt b/libraries/stdlib/src/generated/_CharArrays.kt index 384a038f226..07b20d7f8d2 100644 --- a/libraries/stdlib/src/generated/_CharArrays.kt +++ b/libraries/stdlib/src/generated/_CharArrays.kt @@ -28,7 +28,7 @@ public inline fun CharArray.any(predicate: (Char) -> Boolean) : Boolean { * If a collection could be huge you can specify a non-negative value of *limit* which will only show a subset of the collection then it will * a special *truncated* separator (which defaults to "..." */ -public inline fun CharArray.appendString(buffer: Appendable, separator: String = ", ", prefix: String ="", postfix: String = "", limit: Int = -1, truncated: String = "...") : Unit { +public fun CharArray.appendString(buffer: Appendable, separator: String = ", ", prefix: String ="", postfix: String = "", limit: Int = -1, truncated: String = "...") : Unit { buffer.append(prefix) var count = 0 for (element in this) { @@ -54,7 +54,7 @@ public inline fun CharArray.count(predicate: (Char) -> Boolean) : Int { /** * Returns a list containing everything but the first *n* elements */ -public inline fun CharArray.drop(n: Int) : List { +public fun CharArray.drop(n: Int) : List { return dropWhile(countTo(n)) } @@ -202,7 +202,7 @@ public fun CharArray.isNotEmpty() : Boolean { * If a collection could be huge you can specify a non-negative value of *limit* which will only show a subset of the collection then it will * a special *truncated* separator (which defaults to "..." */ -public inline fun CharArray.makeString(separator: String = ", ", prefix: String = "", postfix: String = "", limit: Int = -1, truncated: String = "...") : String { +public fun CharArray.makeString(separator: String = ", ", prefix: String = "", postfix: String = "", limit: Int = -1, truncated: String = "...") : String { val buffer = StringBuilder() appendString(buffer, separator, prefix, postfix, limit, truncated) return buffer.toString() @@ -282,14 +282,14 @@ public inline fun CharArray.partition(predicate: (Char) -> Boolean) : Pair) : List { +public fun CharArray.plus(collection: Iterable) : List { return plus(collection.iterator()) } /** * Creates an [[Iterator]] which iterates over this iterator then the given element at the end */ -public inline fun CharArray.plus(element: Char) : List { +public fun CharArray.plus(element: Char) : List { val answer = ArrayList() toCollection(answer) answer.add(element) @@ -299,7 +299,7 @@ public inline fun CharArray.plus(element: Char) : List { /** * Creates an [[Iterator]] which iterates over this iterator then the following iterator */ -public inline fun CharArray.plus(iterator: Iterator) : List { +public fun CharArray.plus(iterator: Iterator) : List { val answer = ArrayList() toCollection(answer) for (element in iterator) { @@ -347,7 +347,7 @@ public inline fun CharArray.reduceRight(operation: (Char, Char) -> Char) : Char /** * Reverses the order the elements into a list */ -public inline fun CharArray.reverse() : List { +public fun CharArray.reverse() : List { val list = toCollection(ArrayList()) Collections.reverse(list) return list @@ -371,7 +371,7 @@ public inline fun > CharArray.sortBy(f: (Char) -> R) : List { +public fun CharArray.take(n: Int) : List { return takeWhile(countTo(n)) } @@ -393,7 +393,7 @@ public inline fun > CharArray.takeWhileTo(result: /** * Copies all elements into the given collection */ -public inline fun > CharArray.toCollection(result: C) : C { +public fun > CharArray.toCollection(result: C) : C { for (element in this) result.add(element) return result } @@ -401,35 +401,35 @@ public inline fun > CharArray.toCollection(result: /** * Copies all elements into a [[LinkedList]] */ -public inline fun CharArray.toLinkedList() : LinkedList { +public fun CharArray.toLinkedList() : LinkedList { return toCollection(LinkedList()) } /** * Copies all elements into a [[List]] */ -public inline fun CharArray.toList() : List { +public fun CharArray.toList() : List { return toCollection(ArrayList()) } /** * Copies all elements into a [[Set]] */ -public inline fun CharArray.toSet() : Set { +public fun CharArray.toSet() : Set { return toCollection(LinkedHashSet()) } /** * Copies all elements into a [[SortedSet]] */ -public inline fun CharArray.toSortedSet() : SortedSet { +public fun CharArray.toSortedSet() : SortedSet { return toCollection(TreeSet()) } /** * Returns an iterator of Pairs(index, data) */ -public inline fun CharArray.withIndices() : Iterator> { +public fun CharArray.withIndices() : Iterator> { return IndexIterator(iterator()) } diff --git a/libraries/stdlib/src/generated/_Collections.kt b/libraries/stdlib/src/generated/_Collections.kt index cdec77c6a31..0c80ea0b6e9 100644 --- a/libraries/stdlib/src/generated/_Collections.kt +++ b/libraries/stdlib/src/generated/_Collections.kt @@ -10,7 +10,7 @@ import java.util.* /** * Returns a original Iterable containing all the non-*null* elements, throwing an [[IllegalArgumentException]] if there are any null elements */ -public inline fun Collection.requireNoNulls() : Collection { +public fun Collection.requireNoNulls() : Collection { for (element in this) { if (element == null) { throw IllegalArgumentException("null element found in $this") diff --git a/libraries/stdlib/src/generated/_DoubleArrays.kt b/libraries/stdlib/src/generated/_DoubleArrays.kt index 88f604ea2fe..7061c40cc2e 100644 --- a/libraries/stdlib/src/generated/_DoubleArrays.kt +++ b/libraries/stdlib/src/generated/_DoubleArrays.kt @@ -28,7 +28,7 @@ public inline fun DoubleArray.any(predicate: (Double) -> Boolean) : Boolean { * If a collection could be huge you can specify a non-negative value of *limit* which will only show a subset of the collection then it will * a special *truncated* separator (which defaults to "..." */ -public inline fun DoubleArray.appendString(buffer: Appendable, separator: String = ", ", prefix: String ="", postfix: String = "", limit: Int = -1, truncated: String = "...") : Unit { +public fun DoubleArray.appendString(buffer: Appendable, separator: String = ", ", prefix: String ="", postfix: String = "", limit: Int = -1, truncated: String = "...") : Unit { buffer.append(prefix) var count = 0 for (element in this) { @@ -54,7 +54,7 @@ public inline fun DoubleArray.count(predicate: (Double) -> Boolean) : Int { /** * Returns a list containing everything but the first *n* elements */ -public inline fun DoubleArray.drop(n: Int) : List { +public fun DoubleArray.drop(n: Int) : List { return dropWhile(countTo(n)) } @@ -202,7 +202,7 @@ public fun DoubleArray.isNotEmpty() : Boolean { * If a collection could be huge you can specify a non-negative value of *limit* which will only show a subset of the collection then it will * a special *truncated* separator (which defaults to "..." */ -public inline fun DoubleArray.makeString(separator: String = ", ", prefix: String = "", postfix: String = "", limit: Int = -1, truncated: String = "...") : String { +public fun DoubleArray.makeString(separator: String = ", ", prefix: String = "", postfix: String = "", limit: Int = -1, truncated: String = "...") : String { val buffer = StringBuilder() appendString(buffer, separator, prefix, postfix, limit, truncated) return buffer.toString() @@ -308,14 +308,14 @@ public inline fun DoubleArray.partition(predicate: (Double) -> Boolean) : Pair) : List { +public fun DoubleArray.plus(collection: Iterable) : List { return plus(collection.iterator()) } /** * Creates an [[Iterator]] which iterates over this iterator then the given element at the end */ -public inline fun DoubleArray.plus(element: Double) : List { +public fun DoubleArray.plus(element: Double) : List { val answer = ArrayList() toCollection(answer) answer.add(element) @@ -325,7 +325,7 @@ public inline fun DoubleArray.plus(element: Double) : List { /** * Creates an [[Iterator]] which iterates over this iterator then the following iterator */ -public inline fun DoubleArray.plus(iterator: Iterator) : List { +public fun DoubleArray.plus(iterator: Iterator) : List { val answer = ArrayList() toCollection(answer) for (element in iterator) { @@ -373,7 +373,7 @@ public inline fun DoubleArray.reduceRight(operation: (Double, Double) -> Double) /** * Reverses the order the elements into a list */ -public inline fun DoubleArray.reverse() : List { +public fun DoubleArray.reverse() : List { val list = toCollection(ArrayList()) Collections.reverse(list) return list @@ -397,7 +397,7 @@ public inline fun > DoubleArray.sortBy(f: (Double) -> R) : List /** * Returns a list containing the first *n* elements */ -public inline fun DoubleArray.take(n: Int) : List { +public fun DoubleArray.take(n: Int) : List { return takeWhile(countTo(n)) } @@ -419,7 +419,7 @@ public inline fun > DoubleArray.takeWhileTo(resu /** * Copies all elements into the given collection */ -public inline fun > DoubleArray.toCollection(result: C) : C { +public fun > DoubleArray.toCollection(result: C) : C { for (element in this) result.add(element) return result } @@ -427,35 +427,35 @@ public inline fun > DoubleArray.toCollection(res /** * Copies all elements into a [[LinkedList]] */ -public inline fun DoubleArray.toLinkedList() : LinkedList { +public fun DoubleArray.toLinkedList() : LinkedList { return toCollection(LinkedList()) } /** * Copies all elements into a [[List]] */ -public inline fun DoubleArray.toList() : List { +public fun DoubleArray.toList() : List { return toCollection(ArrayList()) } /** * Copies all elements into a [[Set]] */ -public inline fun DoubleArray.toSet() : Set { +public fun DoubleArray.toSet() : Set { return toCollection(LinkedHashSet()) } /** * Copies all elements into a [[SortedSet]] */ -public inline fun DoubleArray.toSortedSet() : SortedSet { +public fun DoubleArray.toSortedSet() : SortedSet { return toCollection(TreeSet()) } /** * Returns an iterator of Pairs(index, data) */ -public inline fun DoubleArray.withIndices() : Iterator> { +public fun DoubleArray.withIndices() : Iterator> { return IndexIterator(iterator()) } diff --git a/libraries/stdlib/src/generated/_FloatArrays.kt b/libraries/stdlib/src/generated/_FloatArrays.kt index 6d95e06a063..3ba3b4e4cd5 100644 --- a/libraries/stdlib/src/generated/_FloatArrays.kt +++ b/libraries/stdlib/src/generated/_FloatArrays.kt @@ -28,7 +28,7 @@ public inline fun FloatArray.any(predicate: (Float) -> Boolean) : Boolean { * If a collection could be huge you can specify a non-negative value of *limit* which will only show a subset of the collection then it will * a special *truncated* separator (which defaults to "..." */ -public inline fun FloatArray.appendString(buffer: Appendable, separator: String = ", ", prefix: String ="", postfix: String = "", limit: Int = -1, truncated: String = "...") : Unit { +public fun FloatArray.appendString(buffer: Appendable, separator: String = ", ", prefix: String ="", postfix: String = "", limit: Int = -1, truncated: String = "...") : Unit { buffer.append(prefix) var count = 0 for (element in this) { @@ -54,7 +54,7 @@ public inline fun FloatArray.count(predicate: (Float) -> Boolean) : Int { /** * Returns a list containing everything but the first *n* elements */ -public inline fun FloatArray.drop(n: Int) : List { +public fun FloatArray.drop(n: Int) : List { return dropWhile(countTo(n)) } @@ -202,7 +202,7 @@ public fun FloatArray.isNotEmpty() : Boolean { * If a collection could be huge you can specify a non-negative value of *limit* which will only show a subset of the collection then it will * a special *truncated* separator (which defaults to "..." */ -public inline fun FloatArray.makeString(separator: String = ", ", prefix: String = "", postfix: String = "", limit: Int = -1, truncated: String = "...") : String { +public fun FloatArray.makeString(separator: String = ", ", prefix: String = "", postfix: String = "", limit: Int = -1, truncated: String = "...") : String { val buffer = StringBuilder() appendString(buffer, separator, prefix, postfix, limit, truncated) return buffer.toString() @@ -308,14 +308,14 @@ public inline fun FloatArray.partition(predicate: (Float) -> Boolean) : Pair) : List { +public fun FloatArray.plus(collection: Iterable) : List { return plus(collection.iterator()) } /** * Creates an [[Iterator]] which iterates over this iterator then the given element at the end */ -public inline fun FloatArray.plus(element: Float) : List { +public fun FloatArray.plus(element: Float) : List { val answer = ArrayList() toCollection(answer) answer.add(element) @@ -325,7 +325,7 @@ public inline fun FloatArray.plus(element: Float) : List { /** * Creates an [[Iterator]] which iterates over this iterator then the following iterator */ -public inline fun FloatArray.plus(iterator: Iterator) : List { +public fun FloatArray.plus(iterator: Iterator) : List { val answer = ArrayList() toCollection(answer) for (element in iterator) { @@ -373,7 +373,7 @@ public inline fun FloatArray.reduceRight(operation: (Float, Float) -> Float) : F /** * Reverses the order the elements into a list */ -public inline fun FloatArray.reverse() : List { +public fun FloatArray.reverse() : List { val list = toCollection(ArrayList()) Collections.reverse(list) return list @@ -397,7 +397,7 @@ public inline fun > FloatArray.sortBy(f: (Float) -> R) : List { +public fun FloatArray.take(n: Int) : List { return takeWhile(countTo(n)) } @@ -419,7 +419,7 @@ public inline fun > FloatArray.takeWhileTo(result /** * Copies all elements into the given collection */ -public inline fun > FloatArray.toCollection(result: C) : C { +public fun > FloatArray.toCollection(result: C) : C { for (element in this) result.add(element) return result } @@ -427,35 +427,35 @@ public inline fun > FloatArray.toCollection(resul /** * Copies all elements into a [[LinkedList]] */ -public inline fun FloatArray.toLinkedList() : LinkedList { +public fun FloatArray.toLinkedList() : LinkedList { return toCollection(LinkedList()) } /** * Copies all elements into a [[List]] */ -public inline fun FloatArray.toList() : List { +public fun FloatArray.toList() : List { return toCollection(ArrayList()) } /** * Copies all elements into a [[Set]] */ -public inline fun FloatArray.toSet() : Set { +public fun FloatArray.toSet() : Set { return toCollection(LinkedHashSet()) } /** * Copies all elements into a [[SortedSet]] */ -public inline fun FloatArray.toSortedSet() : SortedSet { +public fun FloatArray.toSortedSet() : SortedSet { return toCollection(TreeSet()) } /** * Returns an iterator of Pairs(index, data) */ -public inline fun FloatArray.withIndices() : Iterator> { +public fun FloatArray.withIndices() : Iterator> { return IndexIterator(iterator()) } diff --git a/libraries/stdlib/src/generated/_IntArrays.kt b/libraries/stdlib/src/generated/_IntArrays.kt index a659efcaf00..bf58f4456f8 100644 --- a/libraries/stdlib/src/generated/_IntArrays.kt +++ b/libraries/stdlib/src/generated/_IntArrays.kt @@ -28,7 +28,7 @@ public inline fun IntArray.any(predicate: (Int) -> Boolean) : Boolean { * If a collection could be huge you can specify a non-negative value of *limit* which will only show a subset of the collection then it will * a special *truncated* separator (which defaults to "..." */ -public inline fun IntArray.appendString(buffer: Appendable, separator: String = ", ", prefix: String ="", postfix: String = "", limit: Int = -1, truncated: String = "...") : Unit { +public fun IntArray.appendString(buffer: Appendable, separator: String = ", ", prefix: String ="", postfix: String = "", limit: Int = -1, truncated: String = "...") : Unit { buffer.append(prefix) var count = 0 for (element in this) { @@ -54,7 +54,7 @@ public inline fun IntArray.count(predicate: (Int) -> Boolean) : Int { /** * Returns a list containing everything but the first *n* elements */ -public inline fun IntArray.drop(n: Int) : List { +public fun IntArray.drop(n: Int) : List { return dropWhile(countTo(n)) } @@ -202,7 +202,7 @@ public fun IntArray.isNotEmpty() : Boolean { * If a collection could be huge you can specify a non-negative value of *limit* which will only show a subset of the collection then it will * a special *truncated* separator (which defaults to "..." */ -public inline fun IntArray.makeString(separator: String = ", ", prefix: String = "", postfix: String = "", limit: Int = -1, truncated: String = "...") : String { +public fun IntArray.makeString(separator: String = ", ", prefix: String = "", postfix: String = "", limit: Int = -1, truncated: String = "...") : String { val buffer = StringBuilder() appendString(buffer, separator, prefix, postfix, limit, truncated) return buffer.toString() @@ -308,14 +308,14 @@ public inline fun IntArray.partition(predicate: (Int) -> Boolean) : Pair) : List { +public fun IntArray.plus(collection: Iterable) : List { return plus(collection.iterator()) } /** * Creates an [[Iterator]] which iterates over this iterator then the given element at the end */ -public inline fun IntArray.plus(element: Int) : List { +public fun IntArray.plus(element: Int) : List { val answer = ArrayList() toCollection(answer) answer.add(element) @@ -325,7 +325,7 @@ public inline fun IntArray.plus(element: Int) : List { /** * Creates an [[Iterator]] which iterates over this iterator then the following iterator */ -public inline fun IntArray.plus(iterator: Iterator) : List { +public fun IntArray.plus(iterator: Iterator) : List { val answer = ArrayList() toCollection(answer) for (element in iterator) { @@ -373,7 +373,7 @@ public inline fun IntArray.reduceRight(operation: (Int, Int) -> Int) : Int { /** * Reverses the order the elements into a list */ -public inline fun IntArray.reverse() : List { +public fun IntArray.reverse() : List { val list = toCollection(ArrayList()) Collections.reverse(list) return list @@ -397,7 +397,7 @@ public inline fun > IntArray.sortBy(f: (Int) -> R) : List /** * Returns a list containing the first *n* elements */ -public inline fun IntArray.take(n: Int) : List { +public fun IntArray.take(n: Int) : List { return takeWhile(countTo(n)) } @@ -419,7 +419,7 @@ public inline fun > IntArray.takeWhileTo(result: C, /** * Copies all elements into the given collection */ -public inline fun > IntArray.toCollection(result: C) : C { +public fun > IntArray.toCollection(result: C) : C { for (element in this) result.add(element) return result } @@ -427,35 +427,35 @@ public inline fun > IntArray.toCollection(result: C /** * Copies all elements into a [[LinkedList]] */ -public inline fun IntArray.toLinkedList() : LinkedList { +public fun IntArray.toLinkedList() : LinkedList { return toCollection(LinkedList()) } /** * Copies all elements into a [[List]] */ -public inline fun IntArray.toList() : List { +public fun IntArray.toList() : List { return toCollection(ArrayList()) } /** * Copies all elements into a [[Set]] */ -public inline fun IntArray.toSet() : Set { +public fun IntArray.toSet() : Set { return toCollection(LinkedHashSet()) } /** * Copies all elements into a [[SortedSet]] */ -public inline fun IntArray.toSortedSet() : SortedSet { +public fun IntArray.toSortedSet() : SortedSet { return toCollection(TreeSet()) } /** * Returns an iterator of Pairs(index, data) */ -public inline fun IntArray.withIndices() : Iterator> { +public fun IntArray.withIndices() : Iterator> { return IndexIterator(iterator()) } diff --git a/libraries/stdlib/src/generated/_Iterables.kt b/libraries/stdlib/src/generated/_Iterables.kt index 917b4433355..c3fb27e13fd 100644 --- a/libraries/stdlib/src/generated/_Iterables.kt +++ b/libraries/stdlib/src/generated/_Iterables.kt @@ -28,7 +28,7 @@ public inline fun Iterable.any(predicate: (T) -> Boolean) : Boolean { * If a collection could be huge you can specify a non-negative value of *limit* which will only show a subset of the collection then it will * a special *truncated* separator (which defaults to "..." */ -public inline fun Iterable.appendString(buffer: Appendable, separator: String = ", ", prefix: String ="", postfix: String = "", limit: Int = -1, truncated: String = "...") : Unit { +public fun Iterable.appendString(buffer: Appendable, separator: String = ", ", prefix: String ="", postfix: String = "", limit: Int = -1, truncated: String = "...") : Unit { buffer.append(prefix) var count = 0 for (element in this) { @@ -54,7 +54,7 @@ public inline fun Iterable.count(predicate: (T) -> Boolean) : Int { /** * Returns a list containing everything but the first *n* elements */ -public inline fun Iterable.drop(n: Int) : List { +public fun Iterable.drop(n: Int) : List { return dropWhile(countTo(n)) } @@ -98,14 +98,14 @@ public inline fun Iterable.filterNot(predicate: (T) -> Boolean) : List /** * Returns a list containing all the non-*null* elements */ -public inline fun Iterable.filterNotNull() : List { +public fun Iterable.filterNotNull() : List { return filterNotNullTo>(ArrayList()) } /** * Filters all non-*null* elements into the given list */ -public inline fun > Iterable.filterNotNullTo(result: C) : C { +public fun > Iterable.filterNotNullTo(result: C) : C { for (element in this) if (element != null) result.add(element) return result } @@ -189,7 +189,7 @@ public inline fun Iterable.groupByTo(result: MutableMap Iterable.makeString(separator: String = ", ", prefix: String = "", postfix: String = "", limit: Int = -1, truncated: String = "...") : String { +public fun Iterable.makeString(separator: String = ", ", prefix: String = "", postfix: String = "", limit: Int = -1, truncated: String = "...") : String { val buffer = StringBuilder() appendString(buffer, separator, prefix, postfix, limit, truncated) return buffer.toString() @@ -297,14 +297,14 @@ public inline fun Iterable.partition(predicate: (T) -> Boolean) : Pair
  • Iterable.plus(collection: Iterable) : List { +public fun Iterable.plus(collection: Iterable) : List { return plus(collection.iterator()) } /** * Creates an [[Iterator]] which iterates over this iterator then the given element at the end */ -public inline fun Iterable.plus(element: T) : List { +public fun Iterable.plus(element: T) : List { val answer = ArrayList() toCollection(answer) answer.add(element) @@ -314,7 +314,7 @@ public inline fun Iterable.plus(element: T) : List { /** * Creates an [[Iterator]] which iterates over this iterator then the following iterator */ -public inline fun Iterable.plus(iterator: Iterator) : List { +public fun Iterable.plus(iterator: Iterator) : List { val answer = ArrayList() toCollection(answer) for (element in iterator) { @@ -344,7 +344,7 @@ public inline fun Iterable.reduce(operation: (T, T) -> T) : T { /** * Returns a original Iterable containing all the non-*null* elements, throwing an [[IllegalArgumentException]] if there are any null elements */ -public inline fun Iterable.requireNoNulls() : Iterable { +public fun Iterable.requireNoNulls() : Iterable { for (element in this) { if (element == null) { throw IllegalArgumentException("null element found in $this") @@ -356,7 +356,7 @@ public inline fun Iterable.requireNoNulls() : Iterable { /** * Reverses the order the elements into a list */ -public inline fun Iterable.reverse() : List { +public fun Iterable.reverse() : List { val list = toCollection(ArrayList()) Collections.reverse(list) return list @@ -380,7 +380,7 @@ public inline fun > Iterable.sortBy(f: (T) -> R) : List Iterable.take(n: Int) : List { +public fun Iterable.take(n: Int) : List { return takeWhile(countTo(n)) } @@ -402,7 +402,7 @@ public inline fun > Iterable.takeWhileTo(result /** * Copies all elements into the given collection */ -public inline fun > Iterable.toCollection(result: C) : C { +public fun > Iterable.toCollection(result: C) : C { for (element in this) result.add(element) return result } @@ -410,35 +410,35 @@ public inline fun > Iterable.toCollection(resul /** * Copies all elements into a [[LinkedList]] */ -public inline fun Iterable.toLinkedList() : LinkedList { +public fun Iterable.toLinkedList() : LinkedList { return toCollection(LinkedList()) } /** * Copies all elements into a [[List]] */ -public inline fun Iterable.toList() : List { +public fun Iterable.toList() : List { return toCollection(ArrayList()) } /** * Copies all elements into a [[Set]] */ -public inline fun Iterable.toSet() : Set { +public fun Iterable.toSet() : Set { return toCollection(LinkedHashSet()) } /** * Copies all elements into a [[SortedSet]] */ -public inline fun Iterable.toSortedSet() : SortedSet { +public fun Iterable.toSortedSet() : SortedSet { return toCollection(TreeSet()) } /** * Returns an iterator of Pairs(index, data) */ -public inline fun Iterable.withIndices() : Iterator> { +public fun Iterable.withIndices() : Iterator> { return IndexIterator(iterator()) } diff --git a/libraries/stdlib/src/generated/_Iterators.kt b/libraries/stdlib/src/generated/_Iterators.kt index 6585a4588a1..9cdcacd70eb 100644 --- a/libraries/stdlib/src/generated/_Iterators.kt +++ b/libraries/stdlib/src/generated/_Iterators.kt @@ -28,7 +28,7 @@ public inline fun Iterator.any(predicate: (T) -> Boolean) : Boolean { * If a collection could be huge you can specify a non-negative value of *limit* which will only show a subset of the collection then it will * a special *truncated* separator (which defaults to "..." */ -public inline fun Iterator.appendString(buffer: Appendable, separator: String = ", ", prefix: String ="", postfix: String = "", limit: Int = -1, truncated: String = "...") : Unit { +public fun Iterator.appendString(buffer: Appendable, separator: String = ", ", prefix: String ="", postfix: String = "", limit: Int = -1, truncated: String = "...") : Unit { buffer.append(prefix) var count = 0 for (element in this) { @@ -54,7 +54,7 @@ public inline fun Iterator.count(predicate: (T) -> Boolean) : Int { /** * Returns a list containing everything but the first *n* elements */ -public inline fun Iterator.drop(n: Int) : List { +public fun Iterator.drop(n: Int) : List { return dropWhile(countTo(n)) } @@ -84,7 +84,7 @@ public inline fun > Iterator.dropWhileTo(result: L, p /** * Returns an iterator over elements which match the given *predicate* */ -public inline fun Iterator.filter(predicate: (T) -> Boolean) : Iterator { +public fun Iterator.filter(predicate: (T) -> Boolean) : Iterator { return FilterIterator(this, predicate) } @@ -98,14 +98,14 @@ public inline fun Iterator.filterNot(predicate: (T) -> Boolean) : Iterato /** * Returns an iterator over non-*null* elements */ -public inline fun Iterator.filterNotNull() : Iterator { +public fun Iterator.filterNotNull() : Iterator { return FilterNotNullIterator(this) } /** * Filters all non-*null* elements into the given list */ -public inline fun > Iterator.filterNotNullTo(result: C) : C { +public fun > Iterator.filterNotNullTo(result: C) : C { for (element in this) if (element != null) result.add(element) return result } @@ -137,7 +137,7 @@ public inline fun Iterator.find(predicate: (T) -> Boolean) : T? { /** * Returns an iterator over the concatenated results of transforming each element to one or more values */ -public inline fun Iterator.flatMap(transform: (T) -> Iterator) : Iterator { +public fun Iterator.flatMap(transform: (T) -> Iterator) : Iterator { return FlatMapIterator(this, transform) } @@ -189,7 +189,7 @@ public inline fun Iterator.groupByTo(result: MutableMap Iterator.makeString(separator: String = ", ", prefix: String = "", postfix: String = "", limit: Int = -1, truncated: String = "...") : String { +public fun Iterator.makeString(separator: String = ", ", prefix: String = "", postfix: String = "", limit: Int = -1, truncated: String = "...") : String { val buffer = StringBuilder() appendString(buffer, separator, prefix, postfix, limit, truncated) return buffer.toString() @@ -198,7 +198,7 @@ public inline fun Iterator.makeString(separator: String = ", ", prefix: S /** * Returns an iterator obtained by applying *transform*, a function transforming an object of type *T* into an object of type *R* */ -public inline fun Iterator.map(transform : (T) -> R) : Iterator { +public fun Iterator.map(transform : (T) -> R) : Iterator { return MapIterator(this, transform) } @@ -295,21 +295,21 @@ public inline fun Iterator.partition(predicate: (T) -> Boolean) : Pair
  • Iterator.plus(collection: Iterable) : Iterator { +public fun Iterator.plus(collection: Iterable) : Iterator { return plus(collection.iterator()) } /** * Creates an [[Iterator]] which iterates over this iterator then the given element at the end */ -public inline fun Iterator.plus(element: T) : Iterator { +public fun Iterator.plus(element: T) : Iterator { return CompositeIterator(this, SingleIterator(element)) } /** * Creates an [[Iterator]] which iterates over this iterator then the following iterator */ -public inline fun Iterator.plus(iterator: Iterator) : Iterator { +public fun Iterator.plus(iterator: Iterator) : Iterator { return CompositeIterator(this, iterator) } @@ -334,7 +334,7 @@ public inline fun Iterator.reduce(operation: (T, T) -> T) : T { /** * Returns a original Iterable containing all the non-*null* elements, throwing an [[IllegalArgumentException]] if there are any null elements */ -public inline fun Iterator.requireNoNulls() : Iterator { +public fun Iterator.requireNoNulls() : Iterator { return map{ if (it == null) throw IllegalArgumentException("null element in iterator $this") else it } @@ -343,7 +343,7 @@ public inline fun Iterator.requireNoNulls() : Iterator { /** * Reverses the order the elements into a list */ -public inline fun Iterator.reverse() : List { +public fun Iterator.reverse() : List { val list = toCollection(ArrayList()) Collections.reverse(list) return list @@ -367,7 +367,7 @@ public inline fun > Iterator.sortBy(f: (T) -> R) : List Iterator.take(n: Int) : Iterator { +public fun Iterator.take(n: Int) : Iterator { var count = n return takeWhile{ --count >= 0 } } @@ -375,7 +375,7 @@ public inline fun Iterator.take(n: Int) : Iterator { /** * Returns an iterator restricted to the first elements that match the given *predicate* */ -public inline fun Iterator.takeWhile(predicate: (T) -> Boolean) : Iterator { +public fun Iterator.takeWhile(predicate: (T) -> Boolean) : Iterator { return TakeWhileIterator(this, predicate) } @@ -390,7 +390,7 @@ public inline fun > Iterator.takeWhileTo(result /** * Copies all elements into the given collection */ -public inline fun > Iterator.toCollection(result: C) : C { +public fun > Iterator.toCollection(result: C) : C { for (element in this) result.add(element) return result } @@ -398,35 +398,35 @@ public inline fun > Iterator.toCollection(resul /** * Copies all elements into a [[LinkedList]] */ -public inline fun Iterator.toLinkedList() : LinkedList { +public fun Iterator.toLinkedList() : LinkedList { return toCollection(LinkedList()) } /** * Copies all elements into a [[List]] */ -public inline fun Iterator.toList() : List { +public fun Iterator.toList() : List { return toCollection(ArrayList()) } /** * Copies all elements into a [[Set]] */ -public inline fun Iterator.toSet() : Set { +public fun Iterator.toSet() : Set { return toCollection(LinkedHashSet()) } /** * Copies all elements into a [[SortedSet]] */ -public inline fun Iterator.toSortedSet() : SortedSet { +public fun Iterator.toSortedSet() : SortedSet { return toCollection(TreeSet()) } /** * Returns an iterator of Pairs(index, data) */ -public inline fun Iterator.withIndices() : Iterator> { +public fun Iterator.withIndices() : Iterator> { return IndexIterator(iterator()) } diff --git a/libraries/stdlib/src/generated/_LongArrays.kt b/libraries/stdlib/src/generated/_LongArrays.kt index 63249c5d7f9..4f5d996d3a9 100644 --- a/libraries/stdlib/src/generated/_LongArrays.kt +++ b/libraries/stdlib/src/generated/_LongArrays.kt @@ -28,7 +28,7 @@ public inline fun LongArray.any(predicate: (Long) -> Boolean) : Boolean { * If a collection could be huge you can specify a non-negative value of *limit* which will only show a subset of the collection then it will * a special *truncated* separator (which defaults to "..." */ -public inline fun LongArray.appendString(buffer: Appendable, separator: String = ", ", prefix: String ="", postfix: String = "", limit: Int = -1, truncated: String = "...") : Unit { +public fun LongArray.appendString(buffer: Appendable, separator: String = ", ", prefix: String ="", postfix: String = "", limit: Int = -1, truncated: String = "...") : Unit { buffer.append(prefix) var count = 0 for (element in this) { @@ -54,7 +54,7 @@ public inline fun LongArray.count(predicate: (Long) -> Boolean) : Int { /** * Returns a list containing everything but the first *n* elements */ -public inline fun LongArray.drop(n: Int) : List { +public fun LongArray.drop(n: Int) : List { return dropWhile(countTo(n)) } @@ -202,7 +202,7 @@ public fun LongArray.isNotEmpty() : Boolean { * If a collection could be huge you can specify a non-negative value of *limit* which will only show a subset of the collection then it will * a special *truncated* separator (which defaults to "..." */ -public inline fun LongArray.makeString(separator: String = ", ", prefix: String = "", postfix: String = "", limit: Int = -1, truncated: String = "...") : String { +public fun LongArray.makeString(separator: String = ", ", prefix: String = "", postfix: String = "", limit: Int = -1, truncated: String = "...") : String { val buffer = StringBuilder() appendString(buffer, separator, prefix, postfix, limit, truncated) return buffer.toString() @@ -308,14 +308,14 @@ public inline fun LongArray.partition(predicate: (Long) -> Boolean) : Pair) : List { +public fun LongArray.plus(collection: Iterable) : List { return plus(collection.iterator()) } /** * Creates an [[Iterator]] which iterates over this iterator then the given element at the end */ -public inline fun LongArray.plus(element: Long) : List { +public fun LongArray.plus(element: Long) : List { val answer = ArrayList() toCollection(answer) answer.add(element) @@ -325,7 +325,7 @@ public inline fun LongArray.plus(element: Long) : List { /** * Creates an [[Iterator]] which iterates over this iterator then the following iterator */ -public inline fun LongArray.plus(iterator: Iterator) : List { +public fun LongArray.plus(iterator: Iterator) : List { val answer = ArrayList() toCollection(answer) for (element in iterator) { @@ -373,7 +373,7 @@ public inline fun LongArray.reduceRight(operation: (Long, Long) -> Long) : Long /** * Reverses the order the elements into a list */ -public inline fun LongArray.reverse() : List { +public fun LongArray.reverse() : List { val list = toCollection(ArrayList()) Collections.reverse(list) return list @@ -397,7 +397,7 @@ public inline fun > LongArray.sortBy(f: (Long) -> R) : List { +public fun LongArray.take(n: Int) : List { return takeWhile(countTo(n)) } @@ -419,7 +419,7 @@ public inline fun > LongArray.takeWhileTo(result: /** * Copies all elements into the given collection */ -public inline fun > LongArray.toCollection(result: C) : C { +public fun > LongArray.toCollection(result: C) : C { for (element in this) result.add(element) return result } @@ -427,35 +427,35 @@ public inline fun > LongArray.toCollection(result: /** * Copies all elements into a [[LinkedList]] */ -public inline fun LongArray.toLinkedList() : LinkedList { +public fun LongArray.toLinkedList() : LinkedList { return toCollection(LinkedList()) } /** * Copies all elements into a [[List]] */ -public inline fun LongArray.toList() : List { +public fun LongArray.toList() : List { return toCollection(ArrayList()) } /** * Copies all elements into a [[Set]] */ -public inline fun LongArray.toSet() : Set { +public fun LongArray.toSet() : Set { return toCollection(LinkedHashSet()) } /** * Copies all elements into a [[SortedSet]] */ -public inline fun LongArray.toSortedSet() : SortedSet { +public fun LongArray.toSortedSet() : SortedSet { return toCollection(TreeSet()) } /** * Returns an iterator of Pairs(index, data) */ -public inline fun LongArray.withIndices() : Iterator> { +public fun LongArray.withIndices() : Iterator> { return IndexIterator(iterator()) } diff --git a/libraries/stdlib/src/generated/_ShortArrays.kt b/libraries/stdlib/src/generated/_ShortArrays.kt index 3008b69145e..ebbca31f679 100644 --- a/libraries/stdlib/src/generated/_ShortArrays.kt +++ b/libraries/stdlib/src/generated/_ShortArrays.kt @@ -28,7 +28,7 @@ public inline fun ShortArray.any(predicate: (Short) -> Boolean) : Boolean { * If a collection could be huge you can specify a non-negative value of *limit* which will only show a subset of the collection then it will * a special *truncated* separator (which defaults to "..." */ -public inline fun ShortArray.appendString(buffer: Appendable, separator: String = ", ", prefix: String ="", postfix: String = "", limit: Int = -1, truncated: String = "...") : Unit { +public fun ShortArray.appendString(buffer: Appendable, separator: String = ", ", prefix: String ="", postfix: String = "", limit: Int = -1, truncated: String = "...") : Unit { buffer.append(prefix) var count = 0 for (element in this) { @@ -54,7 +54,7 @@ public inline fun ShortArray.count(predicate: (Short) -> Boolean) : Int { /** * Returns a list containing everything but the first *n* elements */ -public inline fun ShortArray.drop(n: Int) : List { +public fun ShortArray.drop(n: Int) : List { return dropWhile(countTo(n)) } @@ -202,7 +202,7 @@ public fun ShortArray.isNotEmpty() : Boolean { * If a collection could be huge you can specify a non-negative value of *limit* which will only show a subset of the collection then it will * a special *truncated* separator (which defaults to "..." */ -public inline fun ShortArray.makeString(separator: String = ", ", prefix: String = "", postfix: String = "", limit: Int = -1, truncated: String = "...") : String { +public fun ShortArray.makeString(separator: String = ", ", prefix: String = "", postfix: String = "", limit: Int = -1, truncated: String = "...") : String { val buffer = StringBuilder() appendString(buffer, separator, prefix, postfix, limit, truncated) return buffer.toString() @@ -308,14 +308,14 @@ public inline fun ShortArray.partition(predicate: (Short) -> Boolean) : Pair) : List { +public fun ShortArray.plus(collection: Iterable) : List { return plus(collection.iterator()) } /** * Creates an [[Iterator]] which iterates over this iterator then the given element at the end */ -public inline fun ShortArray.plus(element: Short) : List { +public fun ShortArray.plus(element: Short) : List { val answer = ArrayList() toCollection(answer) answer.add(element) @@ -325,7 +325,7 @@ public inline fun ShortArray.plus(element: Short) : List { /** * Creates an [[Iterator]] which iterates over this iterator then the following iterator */ -public inline fun ShortArray.plus(iterator: Iterator) : List { +public fun ShortArray.plus(iterator: Iterator) : List { val answer = ArrayList() toCollection(answer) for (element in iterator) { @@ -373,7 +373,7 @@ public inline fun ShortArray.reduceRight(operation: (Short, Short) -> Short) : S /** * Reverses the order the elements into a list */ -public inline fun ShortArray.reverse() : List { +public fun ShortArray.reverse() : List { val list = toCollection(ArrayList()) Collections.reverse(list) return list @@ -397,7 +397,7 @@ public inline fun > ShortArray.sortBy(f: (Short) -> R) : List { +public fun ShortArray.take(n: Int) : List { return takeWhile(countTo(n)) } @@ -419,7 +419,7 @@ public inline fun > ShortArray.takeWhileTo(result /** * Copies all elements into the given collection */ -public inline fun > ShortArray.toCollection(result: C) : C { +public fun > ShortArray.toCollection(result: C) : C { for (element in this) result.add(element) return result } @@ -427,35 +427,35 @@ public inline fun > ShortArray.toCollection(resul /** * Copies all elements into a [[LinkedList]] */ -public inline fun ShortArray.toLinkedList() : LinkedList { +public fun ShortArray.toLinkedList() : LinkedList { return toCollection(LinkedList()) } /** * Copies all elements into a [[List]] */ -public inline fun ShortArray.toList() : List { +public fun ShortArray.toList() : List { return toCollection(ArrayList()) } /** * Copies all elements into a [[Set]] */ -public inline fun ShortArray.toSet() : Set { +public fun ShortArray.toSet() : Set { return toCollection(LinkedHashSet()) } /** * Copies all elements into a [[SortedSet]] */ -public inline fun ShortArray.toSortedSet() : SortedSet { +public fun ShortArray.toSortedSet() : SortedSet { return toCollection(TreeSet()) } /** * Returns an iterator of Pairs(index, data) */ -public inline fun ShortArray.withIndices() : Iterator> { +public fun ShortArray.withIndices() : Iterator> { return IndexIterator(iterator()) }