36 lines
794 B
Java
Raw Normal View History

2014-12-28 23:02:30 +11:00
package com.intellectualcrafters.plot.object;
public class PlotLoc {
2015-03-31 14:34:18 +11:00
public int x;
public int z;
2015-02-23 12:32:27 +11:00
2015-03-31 14:34:18 +11:00
public PlotLoc(final int x, final int z) {
2014-12-28 23:02:30 +11:00
this.x = x;
this.z = z;
}
2015-02-23 12:32:27 +11:00
2014-12-28 23:02:30 +11:00
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = (prime * result) + this.x;
result = (prime * result) + this.z;
return result;
}
2015-02-23 12:32:27 +11:00
2014-12-28 23:02:30 +11:00
@Override
2015-02-20 17:34:19 +11:00
public boolean equals(final Object obj) {
2014-12-28 23:02:30 +11:00
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (getClass() != obj.getClass()) {
return false;
}
2015-02-20 17:34:19 +11:00
final PlotLoc other = (PlotLoc) obj;
2014-12-28 23:02:30 +11:00
return ((this.x == other.x) && (this.z == other.z));
}
}