added support for map[key] = value on java.util.Map

This commit is contained in:
James Strachan
2012-01-04 16:14:49 +00:00
parent 1cd8f3c2ba
commit e73e81c526
3 changed files with 21 additions and 10 deletions
+3
View File
@@ -13,6 +13,9 @@ val JMap<*,*>.size : Int
val JMap<*,*>.empty : Boolean
get() = isEmpty()
/** Provides [] access to maps */
fun <K, V> JMap<K, V>.set(key : K, value : V) = this.put(key, value)
/** Returns the key of the entry */
val <K,V> JEntry<K,V>.key : K
get() = getKey()