Implement asList, slice & sliceArray extension functions for UArrays
This commit is contained in:
committed by
Ilya Gorbunov
parent
114736c09b
commit
fc85781bfc
@@ -46,8 +46,7 @@ internal constructor(@PublishedApi internal val storage: IntArray) : Collection<
|
||||
}
|
||||
|
||||
override fun containsAll(elements: Collection<UInt>): Boolean {
|
||||
if ((elements as Collection<Any?>).any { it as? UInt == null }) return false
|
||||
return elements.all { storage.contains(it.toInt()) }
|
||||
return (elements as Collection<*>).all { it is UInt && storage.contains(it.toInt()) }
|
||||
}
|
||||
|
||||
override fun isEmpty(): Boolean = this.storage.size == 0
|
||||
|
||||
Reference in New Issue
Block a user