MCPcopy Index your code
hub / github.com/clojure/clojure / mapEquals

Method mapEquals

src/jvm/clojure/lang/APersistentMap.java:55–74  ·  view source on GitHub ↗
(IPersistentMap m1, Object obj)

Source from the content-addressed store, hash-verified

53}
54
55static public boolean mapEquals(IPersistentMap m1, Object obj){
56 if(m1 == obj) return true;
57 if(!(obj instanceof Map))
58 return false;
59 Map m = (Map) obj;
60
61 if(m.size() != m1.count())
62 return false;
63
64 for(ISeq s = m1.seq(); s != null; s = s.next())
65 {
66 Map.Entry e = (Map.Entry) s.first();
67 boolean found = m.containsKey(e.getKey());
68
69 if(!found || !Util.equals(e.getValue(), m.get(e.getKey())))
70 return false;
71 }
72
73 return true;
74}
75
76public boolean equiv(Object obj){
77 if(!(obj instanceof Map))

Callers 1

equalsMethod · 0.95

Calls 10

nextMethod · 0.95
firstMethod · 0.95
equalsMethod · 0.95
countMethod · 0.65
seqMethod · 0.65
containsKeyMethod · 0.65
getMethod · 0.65
sizeMethod · 0.45
getKeyMethod · 0.45
getValueMethod · 0.45

Tested by

no test coverage detected