Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Override
- public boolean equals(Object obj){
- if (obj == null)
- return false;
- if (obj == this)
- return true;
- if (obj.getClass() != getClass())
- return false;
- Coord a = (Coord)obj;
- if(a.x == this.x && a.y == this.y){
- return true;
- }
- else{
- return false;
- }
- }
- @Override
- public int hashCode() {
- int hash = 1;
- hash += hash * 17 + this.x;
- hash += hash * 31 + this.y;
- return hash;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement