Advertisement
Guest User

Untitled

a guest
Jun 24th, 2019
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.97 KB | None | 0 0
  1. @Override
  2. public boolean equals(Object obj) {
  3. if (this == obj)
  4. return true;
  5. if (obj == null)
  6. return false;
  7. if (getClass() != obj.getClass())
  8. return false;
  9. Entity other = (Entity) obj;
  10. if (entityId == null) {
  11. if (other.entityId != null)
  12. return false;
  13. } else if (!entityId.equals(other.entityId))
  14. return false;
  15. return true;
  16. }
  17.  
  18. @Override
  19. public boolean equals(Object obj) {
  20. if (this == obj)
  21. return true;
  22. if (obj == null)
  23. return false;
  24. if (getClass() != obj.getClass())
  25. return false;
  26. Entity other = (Entity) obj;
  27. if (entityId == null) {
  28. if (other.entityId != null)
  29. return false;
  30. else
  31. return true;
  32. } else if (!entityId.equals(other.entityId))
  33. return false;
  34. return true;
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement