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

Method setEquals

src/jvm/clojure/lang/APersistentSet.java:60–76  ·  view source on GitHub ↗
(IPersistentSet s1, Object obj)

Source from the content-addressed store, hash-verified

58}
59
60static public boolean setEquals(IPersistentSet s1, Object obj) {
61 if(s1 == obj) return true;
62 if(!(obj instanceof Set))
63 return false;
64 Set m = (Set) obj;
65
66 if(m.size() != s1.count())
67 return false;
68
69 for(Object aM : m)
70 {
71 if(!s1.contains(aM))
72 return false;
73 }
74
75 return true;
76}
77
78public boolean equiv(Object obj){
79 if (!(obj instanceof Set))

Callers 1

equalsMethod · 0.95

Calls 3

countMethod · 0.65
containsMethod · 0.65
sizeMethod · 0.45

Tested by

no test coverage detected