Re: convert between PersistentArrayMap and HashMap

2014-09-15 Thread webber
You are right. As you pointed out, my java interface design is not good. I've changed java interface into java.util.Map and I could pass Clojure's map to the java interface. I've also tested clojure.walk/postwork. The clojure.walk library is fine ! Thanks, Makoto -- You received this message

Re: convert between PersistentArrayMap and HashMap

2014-09-15 Thread Alex Miller
Well first I'd say that the Java api you're calling into isn't very good if it expects specifically java.util.HashMap. Clojure's map data structures implement java.util.Map so generally they can be passed into Java api methods that take the interface (good practice). However, HashMap has a cons

convert between PersistentArrayMap and HashMap

2014-09-14 Thread Makoto Hashimoto
I am writing clojure code calls java's method which parameters and return are HashMap. When I call java method with clojure's Map, the following error occurred. java.lang.ClassCastException: clojure.lang.PersistentArrayMap cannot be cast to java.util.HashMap So, I'd like to convert nest