Remove bogus filterIsInstance* on strings.
This commit is contained in:
committed by
Andrey Breslav
parent
6562ee4967
commit
9a7758bf4e
@@ -345,13 +345,6 @@ public fun <T, R : T> Stream<T>.filterIsInstance(klass: Class<R>): Stream<T> {
|
||||
return FilteringStream(this, true, { klass.isInstance(it) })
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a list containing all elements that are instances of specified class
|
||||
*/
|
||||
public fun <R : Char> String.filterIsInstance(klass: Class<R>): List<R> {
|
||||
return filterIsInstanceTo(ArrayList<R>(), klass)
|
||||
}
|
||||
|
||||
/**
|
||||
* Appends all elements that are instances of specified class to the given *destination*
|
||||
*/
|
||||
@@ -376,14 +369,6 @@ public fun <T, C : MutableCollection<in R>, R : T> Stream<T>.filterIsInstanceTo(
|
||||
return destination
|
||||
}
|
||||
|
||||
/**
|
||||
* Appends all elements that are instances of specified class to the given *destination*
|
||||
*/
|
||||
public fun <C : MutableCollection<in R>, R : Char> String.filterIsInstanceTo(destination: C, klass: Class<R>): C {
|
||||
for (element in this) if (klass.isInstance(element)) destination.add(element as R)
|
||||
return destination
|
||||
}
|
||||
|
||||
/**
|
||||
* Sorts array or range in array inplace
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user