nested-map

    0熱度

    1回答

    我在Groovy以下數據結構 我想知道,如果Groovy提供了一個簡單的方式(最好是一個班輪)通過這個數據迭代結構,找到具有「代碼」鍵的TreeMap條目並將trim()函數應用於其值。正如您在圖像中看到的,鍵「代碼」的值是「1880」。我想修剪它並使其成爲「1880」。謝謝。

    1熱度

    2回答

    作爲練習和一些內部UTIL我建,我想採用Java屬性文件轉換成JSON層次 foo.bar=15 foo.lots.dir=/tmp/test foo.baz.host=localhost foo.baz.port=333 我已經成功地轉換爲Scala的地圖,這裏是代碼: import java.util._ import scala.io._ import scala.collec

    0熱度

    2回答

    我有一個關於兩個功能,一個走一個完整的地圖和其他特定的關鍵字,像這樣一個問題: (def mapVal {:test "n" :anotherKey "n"}) (defn functionTest [& {:keys [test anotherKey] :or {:test "d" :anotherKey "d"}}] (println :test :anotherKey))