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

Method equiv

src/jvm/clojure/lang/APersistentMap.java:76–97  ·  view source on GitHub ↗
(Object obj)

Source from the content-addressed store, hash-verified

74}
75
76public boolean equiv(Object obj){
77 if(!(obj instanceof Map))
78 return false;
79 if(obj instanceof IPersistentMap && !(obj instanceof MapEquivalence))
80 return false;
81
82 Map m = (Map) obj;
83
84 if(m.size() != size())
85 return false;
86
87 for(ISeq s = seq(); s != null; s = s.next())
88 {
89 Map.Entry e = (Map.Entry) s.first();
90 boolean found = m.containsKey(e.getKey());
91
92 if(!found || !Util.equiv(e.getValue(), m.get(e.getKey())))
93 return false;
94 }
95
96 return true;
97}
98public int hashCode(){
99 int cached = this._hash;
100 if(cached == 0)

Callers

nothing calls this directly

Calls 9

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

Tested by

no test coverage detected