Advertisement
Guest User

Untitled

a guest
Feb 26th, 2017
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. @Override
  2. public boolean equals(Object o) {
  3. if (this == o) return true;
  4. if (o == null || getClass() != o.getClass()) return false;
  5.  
  6. Card card = (Card) o;
  7.  
  8. if (card_value != card.card_value) return false;
  9. return card_color == card.card_color;
  10. }
  11.  
  12. @Override
  13. public int hashCode() {
  14. int result = card_value;
  15. result = 31 * result + (card_color != null ? card_color.hashCode() : 0);
  16. return result;
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement