Why is there no mutable TreeMap in Scala?

后端 未结 5 999
-上瘾入骨i
-上瘾入骨i 2020-12-29 19:17

Is it lack of time, some technical problem or is there a reason why it should not exist?

5条回答
  •  北海茫月
    2020-12-29 19:24

    Meanwhile you can use the Java TreeMap, which is exactly what you need.

    val m = new java.util.TreeMap[String, Int]()
    m.put("aa", 2)
    m.put("cc", 3)
    

提交回复
热议问题