Convert any seq of pairs to a java.utils.Properties instance.
Uses as-str to convert both keys and values into strings.
(defn ^Properties as-properties
"Convert any seq of pairs to a java.utils.Properties instance.
Uses as-str to convert both keys and values into strings."
{:tag Properties}
[m]
(let [p (Properties.)]
(doseq [[k v] m]
(.setProperty p (as-str k) (as-str v)))
p))
Comments top
No comments for as-properties. Log in to add a comment.