Transform Collection.isEmpty and Map.Entry.key/value to properties

This commit is contained in:
Denis Zharkov
2015-10-09 11:29:53 +03:00
parent ad68378836
commit cfc9d19825
34 changed files with 87 additions and 67 deletions
@@ -2,9 +2,9 @@ fun create(): Map<String, String> = null!!
operator fun <K, V> Map<K, V>.iterator(): Iterator<Map.Entry<K, V>> = null!!
operator fun <K, V> Map.Entry<K, V>.component1() = getKey()
operator fun <K, V> Map.Entry<K, V>.component1() = key
operator fun <K, V> Map.Entry<K, V>.component2() = getValue()
operator fun <K, V> Map.Entry<K, V>.component2() = value
class MyClass {
private var m: Map<String, String>? = null