List<T> replaced with Collection<T> in generated from JLangIterables
code.
This commit is contained in:
@@ -83,7 +83,7 @@ public inline fun <T, C: Collection<in T>> Array<T>.filterTo(result: C, predicat
|
||||
*
|
||||
* @includeFunctionBody ../../test/CollectionTest.kt filterNotIntoLinkedList
|
||||
*/
|
||||
public inline fun <T, L: List<in T>> Array<T>.filterNotTo(result: L, predicate: (T) -> Boolean) : L {
|
||||
public inline fun <T, C: Collection<in T>> Array<T>.filterNotTo(result: C, predicate: (T) -> Boolean) : C {
|
||||
for (element in this) if (!predicate(element)) result.add(element)
|
||||
return result
|
||||
}
|
||||
@@ -93,7 +93,7 @@ public inline fun <T, L: List<in T>> Array<T>.filterNotTo(result: L, predicate:
|
||||
*
|
||||
* @includeFunctionBody ../../test/CollectionTest.kt filterNotNullIntoLinkedList
|
||||
*/
|
||||
public inline fun <T, L: List<in T>> Array<T?>?.filterNotNullTo(result: L) : L {
|
||||
public inline fun <T, C: Collection<in T>> Array<T?>?.filterNotNullTo(result: C) : C {
|
||||
if (this != null) {
|
||||
for (element in this) if (element != null) result.add(element)
|
||||
}
|
||||
@@ -176,7 +176,7 @@ public inline fun <T> Array<T>.makeString(separator: String = ", ", prefix: Stri
|
||||
}
|
||||
|
||||
/** Returns a list containing the first elements that satisfy the given *predicate* */
|
||||
public inline fun <T, L: List<in T>> Array<T>.takeWhileTo(result: L, predicate: (T) -> Boolean) : L {
|
||||
public inline fun <T, C: Collection<in T>> Array<T>.takeWhileTo(result: C, predicate: (T) -> Boolean) : C {
|
||||
for (element in this) if (predicate(element)) result.add(element) else break
|
||||
return result
|
||||
}
|
||||
|
||||
@@ -83,7 +83,7 @@ public inline fun <C: Collection<Boolean>> BooleanArray.filterTo(result: C, pred
|
||||
*
|
||||
* @includeFunctionBody ../../test/CollectionTest.kt filterNotIntoLinkedList
|
||||
*/
|
||||
public inline fun <L: List<Boolean>> BooleanArray.filterNotTo(result: L, predicate: (Boolean) -> Boolean) : L {
|
||||
public inline fun <C: Collection<Boolean>> BooleanArray.filterNotTo(result: C, predicate: (Boolean) -> Boolean) : C {
|
||||
for (element in this) if (!predicate(element)) result.add(element)
|
||||
return result
|
||||
}
|
||||
@@ -93,7 +93,7 @@ public inline fun <L: List<Boolean>> BooleanArray.filterNotTo(result: L, predica
|
||||
*
|
||||
* @includeFunctionBody ../../test/CollectionTest.kt filterNotNullIntoLinkedList
|
||||
*/
|
||||
public inline fun <L: List<Boolean>> BooleanArray?.filterNotNullTo(result: L) : L {
|
||||
public inline fun <C: Collection<Boolean>> BooleanArray?.filterNotNullTo(result: C) : C {
|
||||
if (this != null) {
|
||||
for (element in this) if (element != null) result.add(element)
|
||||
}
|
||||
@@ -176,7 +176,7 @@ public inline fun BooleanArray.makeString(separator: String = ", ", prefix: Stri
|
||||
}
|
||||
|
||||
/** Returns a list containing the first elements that satisfy the given *predicate* */
|
||||
public inline fun <L: List<Boolean>> BooleanArray.takeWhileTo(result: L, predicate: (Boolean) -> Boolean) : L {
|
||||
public inline fun <C: Collection<Boolean>> BooleanArray.takeWhileTo(result: C, predicate: (Boolean) -> Boolean) : C {
|
||||
for (element in this) if (predicate(element)) result.add(element) else break
|
||||
return result
|
||||
}
|
||||
|
||||
@@ -83,7 +83,7 @@ public inline fun <C: Collection<Byte>> ByteArray.filterTo(result: C, predicate:
|
||||
*
|
||||
* @includeFunctionBody ../../test/CollectionTest.kt filterNotIntoLinkedList
|
||||
*/
|
||||
public inline fun <L: List<Byte>> ByteArray.filterNotTo(result: L, predicate: (Byte) -> Boolean) : L {
|
||||
public inline fun <C: Collection<Byte>> ByteArray.filterNotTo(result: C, predicate: (Byte) -> Boolean) : C {
|
||||
for (element in this) if (!predicate(element)) result.add(element)
|
||||
return result
|
||||
}
|
||||
@@ -93,7 +93,7 @@ public inline fun <L: List<Byte>> ByteArray.filterNotTo(result: L, predicate: (B
|
||||
*
|
||||
* @includeFunctionBody ../../test/CollectionTest.kt filterNotNullIntoLinkedList
|
||||
*/
|
||||
public inline fun <L: List<Byte>> ByteArray?.filterNotNullTo(result: L) : L {
|
||||
public inline fun <C: Collection<Byte>> ByteArray?.filterNotNullTo(result: C) : C {
|
||||
if (this != null) {
|
||||
for (element in this) if (element != null) result.add(element)
|
||||
}
|
||||
@@ -176,7 +176,7 @@ public inline fun ByteArray.makeString(separator: String = ", ", prefix: String
|
||||
}
|
||||
|
||||
/** Returns a list containing the first elements that satisfy the given *predicate* */
|
||||
public inline fun <L: List<Byte>> ByteArray.takeWhileTo(result: L, predicate: (Byte) -> Boolean) : L {
|
||||
public inline fun <C: Collection<Byte>> ByteArray.takeWhileTo(result: C, predicate: (Byte) -> Boolean) : C {
|
||||
for (element in this) if (predicate(element)) result.add(element) else break
|
||||
return result
|
||||
}
|
||||
|
||||
@@ -83,7 +83,7 @@ public inline fun <C: Collection<Char>> CharArray.filterTo(result: C, predicate:
|
||||
*
|
||||
* @includeFunctionBody ../../test/CollectionTest.kt filterNotIntoLinkedList
|
||||
*/
|
||||
public inline fun <L: List<Char>> CharArray.filterNotTo(result: L, predicate: (Char) -> Boolean) : L {
|
||||
public inline fun <C: Collection<Char>> CharArray.filterNotTo(result: C, predicate: (Char) -> Boolean) : C {
|
||||
for (element in this) if (!predicate(element)) result.add(element)
|
||||
return result
|
||||
}
|
||||
@@ -93,7 +93,7 @@ public inline fun <L: List<Char>> CharArray.filterNotTo(result: L, predicate: (C
|
||||
*
|
||||
* @includeFunctionBody ../../test/CollectionTest.kt filterNotNullIntoLinkedList
|
||||
*/
|
||||
public inline fun <L: List<Char>> CharArray?.filterNotNullTo(result: L) : L {
|
||||
public inline fun <C: Collection<Char>> CharArray?.filterNotNullTo(result: C) : C {
|
||||
if (this != null) {
|
||||
for (element in this) if (element != null) result.add(element)
|
||||
}
|
||||
@@ -176,7 +176,7 @@ public inline fun CharArray.makeString(separator: String = ", ", prefix: String
|
||||
}
|
||||
|
||||
/** Returns a list containing the first elements that satisfy the given *predicate* */
|
||||
public inline fun <L: List<Char>> CharArray.takeWhileTo(result: L, predicate: (Char) -> Boolean) : L {
|
||||
public inline fun <C: Collection<Char>> CharArray.takeWhileTo(result: C, predicate: (Char) -> Boolean) : C {
|
||||
for (element in this) if (predicate(element)) result.add(element) else break
|
||||
return result
|
||||
}
|
||||
|
||||
@@ -83,7 +83,7 @@ public inline fun <C: Collection<Double>> DoubleArray.filterTo(result: C, predic
|
||||
*
|
||||
* @includeFunctionBody ../../test/CollectionTest.kt filterNotIntoLinkedList
|
||||
*/
|
||||
public inline fun <L: List<Double>> DoubleArray.filterNotTo(result: L, predicate: (Double) -> Boolean) : L {
|
||||
public inline fun <C: Collection<Double>> DoubleArray.filterNotTo(result: C, predicate: (Double) -> Boolean) : C {
|
||||
for (element in this) if (!predicate(element)) result.add(element)
|
||||
return result
|
||||
}
|
||||
@@ -93,7 +93,7 @@ public inline fun <L: List<Double>> DoubleArray.filterNotTo(result: L, predicate
|
||||
*
|
||||
* @includeFunctionBody ../../test/CollectionTest.kt filterNotNullIntoLinkedList
|
||||
*/
|
||||
public inline fun <L: List<Double>> DoubleArray?.filterNotNullTo(result: L) : L {
|
||||
public inline fun <C: Collection<Double>> DoubleArray?.filterNotNullTo(result: C) : C {
|
||||
if (this != null) {
|
||||
for (element in this) if (element != null) result.add(element)
|
||||
}
|
||||
@@ -176,7 +176,7 @@ public inline fun DoubleArray.makeString(separator: String = ", ", prefix: Strin
|
||||
}
|
||||
|
||||
/** Returns a list containing the first elements that satisfy the given *predicate* */
|
||||
public inline fun <L: List<Double>> DoubleArray.takeWhileTo(result: L, predicate: (Double) -> Boolean) : L {
|
||||
public inline fun <C: Collection<Double>> DoubleArray.takeWhileTo(result: C, predicate: (Double) -> Boolean) : C {
|
||||
for (element in this) if (predicate(element)) result.add(element) else break
|
||||
return result
|
||||
}
|
||||
|
||||
@@ -83,7 +83,7 @@ public inline fun <C: Collection<Float>> FloatArray.filterTo(result: C, predicat
|
||||
*
|
||||
* @includeFunctionBody ../../test/CollectionTest.kt filterNotIntoLinkedList
|
||||
*/
|
||||
public inline fun <L: List<Float>> FloatArray.filterNotTo(result: L, predicate: (Float) -> Boolean) : L {
|
||||
public inline fun <C: Collection<Float>> FloatArray.filterNotTo(result: C, predicate: (Float) -> Boolean) : C {
|
||||
for (element in this) if (!predicate(element)) result.add(element)
|
||||
return result
|
||||
}
|
||||
@@ -93,7 +93,7 @@ public inline fun <L: List<Float>> FloatArray.filterNotTo(result: L, predicate:
|
||||
*
|
||||
* @includeFunctionBody ../../test/CollectionTest.kt filterNotNullIntoLinkedList
|
||||
*/
|
||||
public inline fun <L: List<Float>> FloatArray?.filterNotNullTo(result: L) : L {
|
||||
public inline fun <C: Collection<Float>> FloatArray?.filterNotNullTo(result: C) : C {
|
||||
if (this != null) {
|
||||
for (element in this) if (element != null) result.add(element)
|
||||
}
|
||||
@@ -176,7 +176,7 @@ public inline fun FloatArray.makeString(separator: String = ", ", prefix: String
|
||||
}
|
||||
|
||||
/** Returns a list containing the first elements that satisfy the given *predicate* */
|
||||
public inline fun <L: List<Float>> FloatArray.takeWhileTo(result: L, predicate: (Float) -> Boolean) : L {
|
||||
public inline fun <C: Collection<Float>> FloatArray.takeWhileTo(result: C, predicate: (Float) -> Boolean) : C {
|
||||
for (element in this) if (predicate(element)) result.add(element) else break
|
||||
return result
|
||||
}
|
||||
|
||||
@@ -83,7 +83,7 @@ public inline fun <C: Collection<Int>> IntArray.filterTo(result: C, predicate: (
|
||||
*
|
||||
* @includeFunctionBody ../../test/CollectionTest.kt filterNotIntoLinkedList
|
||||
*/
|
||||
public inline fun <L: List<Int>> IntArray.filterNotTo(result: L, predicate: (Int) -> Boolean) : L {
|
||||
public inline fun <C: Collection<Int>> IntArray.filterNotTo(result: C, predicate: (Int) -> Boolean) : C {
|
||||
for (element in this) if (!predicate(element)) result.add(element)
|
||||
return result
|
||||
}
|
||||
@@ -93,7 +93,7 @@ public inline fun <L: List<Int>> IntArray.filterNotTo(result: L, predicate: (Int
|
||||
*
|
||||
* @includeFunctionBody ../../test/CollectionTest.kt filterNotNullIntoLinkedList
|
||||
*/
|
||||
public inline fun <L: List<Int>> IntArray?.filterNotNullTo(result: L) : L {
|
||||
public inline fun <C: Collection<Int>> IntArray?.filterNotNullTo(result: C) : C {
|
||||
if (this != null) {
|
||||
for (element in this) if (element != null) result.add(element)
|
||||
}
|
||||
@@ -176,7 +176,7 @@ public inline fun IntArray.makeString(separator: String = ", ", prefix: String =
|
||||
}
|
||||
|
||||
/** Returns a list containing the first elements that satisfy the given *predicate* */
|
||||
public inline fun <L: List<Int>> IntArray.takeWhileTo(result: L, predicate: (Int) -> Boolean) : L {
|
||||
public inline fun <C: Collection<Int>> IntArray.takeWhileTo(result: C, predicate: (Int) -> Boolean) : C {
|
||||
for (element in this) if (predicate(element)) result.add(element) else break
|
||||
return result
|
||||
}
|
||||
|
||||
@@ -81,7 +81,7 @@ public inline fun <T, C: Collection<in T>> java.util.Iterator<T>.filterTo(result
|
||||
*
|
||||
* @includeFunctionBody ../../test/CollectionTest.kt filterNotIntoLinkedList
|
||||
*/
|
||||
public inline fun <T, L: List<in T>> java.util.Iterator<T>.filterNotTo(result: L, predicate: (T) -> Boolean) : L {
|
||||
public inline fun <T, C: Collection<in T>> java.util.Iterator<T>.filterNotTo(result: C, predicate: (T) -> Boolean) : C {
|
||||
for (element in this) if (!predicate(element)) result.add(element)
|
||||
return result
|
||||
}
|
||||
@@ -91,7 +91,7 @@ public inline fun <T, L: List<in T>> java.util.Iterator<T>.filterNotTo(result: L
|
||||
*
|
||||
* @includeFunctionBody ../../test/CollectionTest.kt filterNotNullIntoLinkedList
|
||||
*/
|
||||
public inline fun <T, L: List<in T>> java.util.Iterator<T?>?.filterNotNullTo(result: L) : L {
|
||||
public inline fun <T, C: Collection<in T>> java.util.Iterator<T?>?.filterNotNullTo(result: C) : C {
|
||||
if (this != null) {
|
||||
for (element in this) if (element != null) result.add(element)
|
||||
}
|
||||
@@ -174,7 +174,7 @@ public inline fun <T> java.util.Iterator<T>.makeString(separator: String = ", ",
|
||||
}
|
||||
|
||||
/** Returns a list containing the first elements that satisfy the given *predicate* */
|
||||
public inline fun <T, L: List<in T>> java.util.Iterator<T>.takeWhileTo(result: L, predicate: (T) -> Boolean) : L {
|
||||
public inline fun <T, C: Collection<in T>> java.util.Iterator<T>.takeWhileTo(result: C, predicate: (T) -> Boolean) : C {
|
||||
for (element in this) if (predicate(element)) result.add(element) else break
|
||||
return result
|
||||
}
|
||||
|
||||
@@ -83,7 +83,7 @@ public inline fun <C: Collection<Long>> LongArray.filterTo(result: C, predicate:
|
||||
*
|
||||
* @includeFunctionBody ../../test/CollectionTest.kt filterNotIntoLinkedList
|
||||
*/
|
||||
public inline fun <L: List<Long>> LongArray.filterNotTo(result: L, predicate: (Long) -> Boolean) : L {
|
||||
public inline fun <C: Collection<Long>> LongArray.filterNotTo(result: C, predicate: (Long) -> Boolean) : C {
|
||||
for (element in this) if (!predicate(element)) result.add(element)
|
||||
return result
|
||||
}
|
||||
@@ -93,7 +93,7 @@ public inline fun <L: List<Long>> LongArray.filterNotTo(result: L, predicate: (L
|
||||
*
|
||||
* @includeFunctionBody ../../test/CollectionTest.kt filterNotNullIntoLinkedList
|
||||
*/
|
||||
public inline fun <L: List<Long>> LongArray?.filterNotNullTo(result: L) : L {
|
||||
public inline fun <C: Collection<Long>> LongArray?.filterNotNullTo(result: C) : C {
|
||||
if (this != null) {
|
||||
for (element in this) if (element != null) result.add(element)
|
||||
}
|
||||
@@ -176,7 +176,7 @@ public inline fun LongArray.makeString(separator: String = ", ", prefix: String
|
||||
}
|
||||
|
||||
/** Returns a list containing the first elements that satisfy the given *predicate* */
|
||||
public inline fun <L: List<Long>> LongArray.takeWhileTo(result: L, predicate: (Long) -> Boolean) : L {
|
||||
public inline fun <C: Collection<Long>> LongArray.takeWhileTo(result: C, predicate: (Long) -> Boolean) : C {
|
||||
for (element in this) if (predicate(element)) result.add(element) else break
|
||||
return result
|
||||
}
|
||||
|
||||
@@ -83,7 +83,7 @@ public inline fun <C: Collection<Short>> ShortArray.filterTo(result: C, predicat
|
||||
*
|
||||
* @includeFunctionBody ../../test/CollectionTest.kt filterNotIntoLinkedList
|
||||
*/
|
||||
public inline fun <L: List<Short>> ShortArray.filterNotTo(result: L, predicate: (Short) -> Boolean) : L {
|
||||
public inline fun <C: Collection<Short>> ShortArray.filterNotTo(result: C, predicate: (Short) -> Boolean) : C {
|
||||
for (element in this) if (!predicate(element)) result.add(element)
|
||||
return result
|
||||
}
|
||||
@@ -93,7 +93,7 @@ public inline fun <L: List<Short>> ShortArray.filterNotTo(result: L, predicate:
|
||||
*
|
||||
* @includeFunctionBody ../../test/CollectionTest.kt filterNotNullIntoLinkedList
|
||||
*/
|
||||
public inline fun <L: List<Short>> ShortArray?.filterNotNullTo(result: L) : L {
|
||||
public inline fun <C: Collection<Short>> ShortArray?.filterNotNullTo(result: C) : C {
|
||||
if (this != null) {
|
||||
for (element in this) if (element != null) result.add(element)
|
||||
}
|
||||
@@ -176,7 +176,7 @@ public inline fun ShortArray.makeString(separator: String = ", ", prefix: String
|
||||
}
|
||||
|
||||
/** Returns a list containing the first elements that satisfy the given *predicate* */
|
||||
public inline fun <L: List<Short>> ShortArray.takeWhileTo(result: L, predicate: (Short) -> Boolean) : L {
|
||||
public inline fun <C: Collection<Short>> ShortArray.takeWhileTo(result: C, predicate: (Short) -> Boolean) : C {
|
||||
for (element in this) if (predicate(element)) result.add(element) else break
|
||||
return result
|
||||
}
|
||||
|
||||
@@ -83,7 +83,7 @@ public inline fun <T, C: Collection<in T>> Iterable<T>.filterTo(result: C, predi
|
||||
*
|
||||
* @includeFunctionBody ../../test/CollectionTest.kt filterNotIntoLinkedList
|
||||
*/
|
||||
public inline fun <T, L: List<in T>> Iterable<T>.filterNotTo(result: L, predicate: (T) -> Boolean) : L {
|
||||
public inline fun <T, C: Collection<in T>> Iterable<T>.filterNotTo(result: C, predicate: (T) -> Boolean) : C {
|
||||
for (element in this) if (!predicate(element)) result.add(element)
|
||||
return result
|
||||
}
|
||||
@@ -93,7 +93,7 @@ public inline fun <T, L: List<in T>> Iterable<T>.filterNotTo(result: L, predicat
|
||||
*
|
||||
* @includeFunctionBody ../../test/CollectionTest.kt filterNotNullIntoLinkedList
|
||||
*/
|
||||
public inline fun <T, L: List<in T>> Iterable<T?>?.filterNotNullTo(result: L) : L {
|
||||
public inline fun <T, C: Collection<in T>> Iterable<T?>?.filterNotNullTo(result: C) : C {
|
||||
if (this != null) {
|
||||
for (element in this) if (element != null) result.add(element)
|
||||
}
|
||||
@@ -176,7 +176,7 @@ public inline fun <T> Iterable<T>.makeString(separator: String = ", ", prefix: S
|
||||
}
|
||||
|
||||
/** Returns a list containing the first elements that satisfy the given *predicate* */
|
||||
public inline fun <T, L: List<in T>> Iterable<T>.takeWhileTo(result: L, predicate: (T) -> Boolean) : L {
|
||||
public inline fun <T, C: Collection<in T>> Iterable<T>.takeWhileTo(result: C, predicate: (T) -> Boolean) : C {
|
||||
for (element in this) if (predicate(element)) result.add(element) else break
|
||||
return result
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user