#KT-1772 Fixed

This commit is contained in:
James Strachan
2012-04-12 14:29:44 +01:00
parent c3f1e38c67
commit f9b00ad3f9
2 changed files with 61 additions and 6 deletions
+11
View File
@@ -64,3 +64,14 @@ public inline fun <K,V> java.util.Map<K,V>.getOrPut(key: K, defaultValue: ()-> V
return answer
}
}
/**
* Returns an [[Iterator]] over the entries in the [[Map]]
*
* @includeFunctionBody ../../test/MapTest.kt iterate
*/
public inline fun <K,V> java.util.Map<K,V>.iterator(): java.util.Iterator<java.util.Map.Entry<K,V>> {
val entrySet = this.entrySet()!!
return entrySet.iterator()!!
}