mirror of
https://github.com/2006-Scape/apollo.git
synced 2026-07-07 08:39:17 +00:00
Cleanup equals().
This commit is contained in:
@@ -62,18 +62,14 @@ public final class Position {
|
|||||||
public boolean equals(Object obj) {
|
public boolean equals(Object obj) {
|
||||||
if (obj == null) {
|
if (obj == null) {
|
||||||
return false;
|
return false;
|
||||||
}
|
} else if (this == obj) {
|
||||||
if (this == obj) {
|
|
||||||
return true;
|
return true;
|
||||||
}
|
} else if (getClass() != obj.getClass()) {
|
||||||
if (getClass() != obj.getClass()) {
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
Position other = (Position) obj;
|
Position other = (Position) obj;
|
||||||
if (height != other.height || x != other.x || y != other.y) {
|
return x == other.x && y == other.y && height == other.height;
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user