下面的代码正在运行,但对我来说看起来很奇怪,有没有更好的方法。
var res:scala.collection.mutable.LinkedHashMap[String,scala.collection.immutable.Map[String,String]]=??
var arList = new ArrayList[String]()
res.keySet.map(arList.add(_))
//here res key set changed so i want to reassign the list by new keySet
res=?? //updated
arList.clear
res.keySet.map(arList.add(_))
.clear
它看起来很奇怪,打电话arList