From af2b419d3b6a77db735eff98eb48173376b8226c Mon Sep 17 00:00:00 2001 From: Mark Engelberg Date: Fri, 20 May 2011 21:47:17 -0700 Subject: Priority-map: One more improvement to equals method --- modules/priority-map/src/main/clojure/clojure/contrib/priority_map.clj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/priority-map/src/main/clojure/clojure/contrib/priority_map.clj b/modules/priority-map/src/main/clojure/clojure/contrib/priority_map.clj index fb1b67b1..b29cf1f5 100644 --- a/modules/priority-map/src/main/clojure/clojure/contrib/priority_map.clj +++ b/modules/priority-map/src/main/clojure/clojure/contrib/priority_map.clj @@ -211,7 +211,7 @@ to Clojure's assortment of built-in maps (hash-map and sorted-map). ; their key-value pairs are the same. (equiv [this o] (.equiv item->priority o)) (hashCode [this] (.hashCode item->priority)) - (equals [this o] (.equals item->priority o)) + (equals [this o] (or (identical? this o) (.equals item->priority o))) ;containsKey implements (contains? pm k) behavior (containsKey [this item] (contains? item->priority item)) -- cgit v1.2.3-18-g5258