4
as String
キャストを取り除くにはどうしたらいいですか?<K,V>の<K,V>タイプを指定してください
私は何をしたいことはfun
定義を変更することですが、私はそれを行う方法がわからないんだけど...ただ、一般的な定義を取り除くと使いますString
parametersOf("appKey" to "asdas3334", "token" to "433432")
/**
* Returns a new [Parameters] with the specified contents, given as a list of pairs
* where the first component is the key and the second is the value.
*/
fun <K, V> parametersOf(vararg pairs: Pair<K, V>): Parameters {
val p = Parameters(pairs.size)
for ((key, value) in pairs)
p.put(key as String, value as String)
return p
}