(java-map->clojure-map java-map)
A util method for converting a Java HashMap (Map) to a clojure hash-map. This but can be used to convert any Java HashMap where following are required:
java.util.Map
need to be
converted to Clojure's hash-map (or clojure.lang.APersistentMap
).java.lang.Iterable
(e.g. ArraLists, HashSets) need to
be converted to Clojure sequences.output-transformer-fn
to return the output as a clojure map.It supports conversion of Java Maps to Clojure's APersistent
type;
and Java Lists and Arrays or anything which extends java.lang.Iterable
to clojure's PersistentVector type.
A util method for converting a Java HashMap (Map) to a clojure hash-map. This but can be used to convert any Java HashMap where following are required: 1) An inner value of type `java.util.Map` need to be converted to Clojure's hash-map (or `clojure.lang.APersistentMap`). 2) An inner value which either is a Java Array or extends `java.lang.Iterable` (e.g. ArraLists, HashSets) need to be converted to Clojure sequences. 3) An inner value which is a Clojure function but returns a java.util.Map as output. This method will wrap the function using `output-transformer-fn` to return the output as a clojure map. It supports conversion of Java Maps to Clojure's `APersistent` type; and Java Lists and Arrays or anything which extends `java.lang.Iterable` to clojure's PersistentVector type.
(output-transformer-fn func)
This function returns a function which transforms the output of the provided
function func
, if the output is an instance of java.util.Map
.
This function returns a function which transforms the output of the provided function `func`, if the output is an instance of `java.util.Map`.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close