MCPcopy Create free account
hub / github.com/SW-Fantastic/Reader / equals

Method equals

src/main/java/org/swdc/reader/entity/BookType.java:33–44  ·  view source on GitHub ↗
(Object obj)

Source from the content-addressed store, hash-verified

31 }
32
33 @Override
34 public boolean equals(Object obj) {
35 if (obj instanceof BookType) {
36 BookType otherOne = (BookType)obj;
37 if (otherOne.getId() != null && this.getId() != null) {
38 return otherOne.getId().equals(this.getId());
39 } else if (this.getId() == null && otherOne.getId() == null && this.getName().equals(otherOne.getName())) {
40 return true;
41 }
42 }
43 return false;
44 }
45
46 @Override
47 public int hashCode() {

Callers

nothing calls this directly

Calls 2

getIdMethod · 0.95
getNameMethod · 0.95

Tested by

no test coverage detected