quick Java implementation of Clojure's reduce into map