MCPcopy Create free account
hub / github.com/Berkeley-CS61B/skeleton-sp23 / equals

Method equals

lab03/src/common/IntList.java:39–52  ·  view source on GitHub ↗
(Object other)

Source from the content-addressed store, hash-verified

37 }
38
39 public boolean equals(Object other) {
40 if (other instanceof IntList oL) {
41 if (first != oL.first) {
42 return false;
43 } else if (rest == null && oL.rest == null) {
44 return true;
45 } else if (rest != null && oL.rest != null) {
46 return rest.equals(oL.rest);
47 } else {
48 return false;
49 }
50 }
51 return false;
52 }
53
54 public String print() {
55 if (rest == null) {

Callers 2

playStageMethod · 0.95
playStageMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected