(final Object obj)
| 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) |
no test coverage detected