Kotlin教程:HashMap:hashMapOf()函数

hashMapOf()HashMap类的函数。 它返回具有指定内容的新HashMap。 它包含键和值形式的数据对。 HashMap是可变集合,它提供了读写功能。

hashMapOf()函数的语法

inline fun  hashMapOf(): HashMap (source)  
// 
fun  hashMapOf(vararg pairs: Pair): HashMap (source)