Adjust stdlib to isEmpty transformation

This commit is contained in:
Denis Zharkov
2015-10-09 11:25:19 +03:00
parent cfc9d19825
commit 61459961fc
10 changed files with 32 additions and 30 deletions
+2 -2
View File
@@ -13,7 +13,7 @@ public interface Comparator<T> {
@library
public abstract class AbstractCollection<E>() : MutableCollection<E> {
override fun isEmpty(): Boolean = noImpl
override val isEmpty: Boolean get() = noImpl
override fun contains(o: E): Boolean = noImpl
override fun iterator(): MutableIterator<E> = noImpl
@@ -103,7 +103,7 @@ public open class LinkedHashSet<E>(
@library
public open class HashMap<K, V>(initialCapacity: Int = DEFAULT_INITIAL_CAPACITY, loadFactor: Float = DEFAULT_LOAD_FACTOR) : MutableMap<K, V> {
override val size: Int get() = noImpl
override fun isEmpty(): Boolean = noImpl
override val isEmpty: Boolean get() = noImpl
@Suppress("BASE_WITH_NULLABLE_UPPER_BOUND")
override fun get(key: Any?): V? = noImpl
override fun containsKey(key: Any?): Boolean = noImpl
+1 -1
View File
@@ -178,7 +178,7 @@ private fun RegExp.findNext(input: String, from: Int): MatchResult? {
override val groups: MatchGroupCollection = object : MatchGroupCollection {
override val size: Int get() = match.size()
override fun isEmpty(): Boolean = size() == 0
override val isEmpty: Boolean get() = size() == 0
override fun contains(o: MatchGroup?): Boolean = this.any { it == o }
override fun containsAll(c: Collection<MatchGroup?>): Boolean = c.all({contains(it)})