MCPcopy Create free account
hub / github.com/Card-Forge/forge / equals

Method equals

forge-core/src/main/java/forge/item/PaperCard.java:271–295  ·  view source on GitHub ↗
(final Object obj)

Source from the content-addressed store, hash-verified

269
270 // Want this class to be a key for HashTable
271 @Override
272 public boolean equals(final Object obj) {
273 if (this == obj) {
274 return true;
275 }
276 if (obj == null) {
277 return false;
278 }
279 if (getClass() != obj.getClass()) {
280 return false;
281 }
282
283 final PaperCard other = (PaperCard) obj;
284 if (!name.equals(other.name)) {
285 return false;
286 }
287 if (!edition.equals(other.edition)) {
288 return false;
289 }
290 if (!getCollectorNumber().equals(other.getCollectorNumber()))
291 return false;
292 if (!Objects.equals(flags, other.flags))
293 return false;
294 return (other.foil == foil) && (other.artIndex == artIndex);
295 }
296
297 /*
298 * (non-Javadoc)

Callers 14

recordDraftPickMethod · 0.95
comparePhantasmGuessMethod · 0.95
copyWithMarkedColorsMethod · 0.45
PaperCardMethod · 0.45
getAllSearchableNamesMethod · 0.45
getVariantForFaceMethod · 0.45
isVeryBasicLandMethod · 0.45
equalsMethod · 0.45
PaperTokenMethod · 0.45

Calls 1

getCollectorNumberMethod · 0.95

Tested by

no test coverage detected