Minor: cleanup asSequence() documentation.

This commit is contained in:
Ilya Gorbunov
2015-11-29 05:25:09 +03:00
parent f596d9ac23
commit 6ca647aecd
6 changed files with 24 additions and 31 deletions
+9 -9
View File
@@ -10506,7 +10506,7 @@ public fun ShortArray.asIterable(): Iterable<Short> {
}
/**
* Returns a sequence from the given collection.
* Creates a [Sequence] instance that wraps the original array returning its elements when being iterated.
*/
public fun <T> Array<out T>.asSequence(): Sequence<T> {
if (isEmpty()) return emptySequence()
@@ -10518,7 +10518,7 @@ public fun <T> Array<out T>.asSequence(): Sequence<T> {
}
/**
* Returns a sequence from the given collection.
* Creates a [Sequence] instance that wraps the original array returning its elements when being iterated.
*/
public fun BooleanArray.asSequence(): Sequence<Boolean> {
if (isEmpty()) return emptySequence()
@@ -10530,7 +10530,7 @@ public fun BooleanArray.asSequence(): Sequence<Boolean> {
}
/**
* Returns a sequence from the given collection.
* Creates a [Sequence] instance that wraps the original array returning its elements when being iterated.
*/
public fun ByteArray.asSequence(): Sequence<Byte> {
if (isEmpty()) return emptySequence()
@@ -10542,7 +10542,7 @@ public fun ByteArray.asSequence(): Sequence<Byte> {
}
/**
* Returns a sequence from the given collection.
* Creates a [Sequence] instance that wraps the original array returning its elements when being iterated.
*/
public fun CharArray.asSequence(): Sequence<Char> {
if (isEmpty()) return emptySequence()
@@ -10554,7 +10554,7 @@ public fun CharArray.asSequence(): Sequence<Char> {
}
/**
* Returns a sequence from the given collection.
* Creates a [Sequence] instance that wraps the original array returning its elements when being iterated.
*/
public fun DoubleArray.asSequence(): Sequence<Double> {
if (isEmpty()) return emptySequence()
@@ -10566,7 +10566,7 @@ public fun DoubleArray.asSequence(): Sequence<Double> {
}
/**
* Returns a sequence from the given collection.
* Creates a [Sequence] instance that wraps the original array returning its elements when being iterated.
*/
public fun FloatArray.asSequence(): Sequence<Float> {
if (isEmpty()) return emptySequence()
@@ -10578,7 +10578,7 @@ public fun FloatArray.asSequence(): Sequence<Float> {
}
/**
* Returns a sequence from the given collection.
* Creates a [Sequence] instance that wraps the original array returning its elements when being iterated.
*/
public fun IntArray.asSequence(): Sequence<Int> {
if (isEmpty()) return emptySequence()
@@ -10590,7 +10590,7 @@ public fun IntArray.asSequence(): Sequence<Int> {
}
/**
* Returns a sequence from the given collection.
* Creates a [Sequence] instance that wraps the original array returning its elements when being iterated.
*/
public fun LongArray.asSequence(): Sequence<Long> {
if (isEmpty()) return emptySequence()
@@ -10602,7 +10602,7 @@ public fun LongArray.asSequence(): Sequence<Long> {
}
/**
* Returns a sequence from the given collection.
* Creates a [Sequence] instance that wraps the original array returning its elements when being iterated.
*/
public fun ShortArray.asSequence(): Sequence<Short> {
if (isEmpty()) return emptySequence()
@@ -1769,7 +1769,7 @@ public fun <T> Iterable<T>.asIterable(): Iterable<T> {
}
/**
* Returns a sequence from the given collection.
* Creates a [Sequence] instance that wraps the original collection returning its elements when being iterated.
*/
public fun <T> Iterable<T>.asSequence(): Sequence<T> {
return object : Sequence<T> {
+1 -1
View File
@@ -196,7 +196,7 @@ public fun <K, V> Map<K, V>.asIterable(): Iterable<Map.Entry<K, V>> {
}
/**
* Returns a sequence from the given collection.
* Creates a [Sequence] instance that wraps the original map returning its entrys when being iterated.
*/
public fun <K, V> Map<K, V>.asSequence(): Sequence<Map.Entry<K, V>> {
return object : Sequence<Map.Entry<K, V>> {
+1 -1
View File
@@ -1085,7 +1085,7 @@ public fun <T> Sequence<T>.asIterable(): Iterable<T> {
}
/**
* Returns a sequence from the given collection.
* Returns this sequence as a [Sequence].
*/
public fun <T> Sequence<T>.asSequence(): Sequence<T> {
return this
+2 -2
View File
@@ -1618,7 +1618,7 @@ public fun CharSequence.asIterable(): Iterable<Char> {
}
/**
* Returns a sequence from the given collection.
* Creates a [Sequence] instance that wraps the original char sequence returning its characters when being iterated.
*/
public fun CharSequence.asSequence(): Sequence<Char> {
if (this is String && isEmpty()) return emptySequence()
@@ -1630,7 +1630,7 @@ public fun CharSequence.asSequence(): Sequence<Char> {
}
/**
* Returns a sequence from the given collection.
* Creates a [Sequence] instance that wraps the original string returning its characters when being iterated.
*/
@Deprecated("Provided for binary compatibility", level = DeprecationLevel.HIDDEN)
public fun String.asSequence(): Sequence<Char> {