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

Method equiv

src/jvm/clojure/lang/ASeq.java:39–56  ·  view source on GitHub ↗
(Object obj)

Source from the content-addressed store, hash-verified

37}
38
39public boolean equiv(Object obj){
40
41 if(!(obj instanceof Sequential || obj instanceof List))
42 return false;
43
44 if(this instanceof Counted && obj instanceof Counted &&
45 ((Counted)this).count() != ((Counted)obj).count())
46 return false;
47
48 ISeq ms = RT.seq(obj);
49 for(ISeq s = seq(); s != null; s = s.next(), ms = ms.next())
50 {
51 if(ms == null || !Util.equiv(s.first(), ms.first()))
52 return false;
53 }
54 return ms == null;
55
56}
57
58public boolean equals(Object obj){
59 if(this == obj) return true;

Callers

nothing calls this directly

Calls 6

seqMethod · 0.95
seqMethod · 0.95
nextMethod · 0.95
equivMethod · 0.95
firstMethod · 0.95
countMethod · 0.65

Tested by

no test coverage detected