mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-07-05 16:40:04 +00:00
- so certain people can look at the diff and complain about my sloppy code :( Signed-off-by: Jesse Boyd <jessepaleg@gmail.com>
34 lines
713 B
Java
34 lines
713 B
Java
package com.boydti.fawe.object;
|
|
|
|
public class IntegerPair {
|
|
public int x;
|
|
public int z;
|
|
|
|
public IntegerPair(final int x, final int z) {
|
|
this.x = x;
|
|
this.z = z;
|
|
}
|
|
|
|
@Override
|
|
public int hashCode() {
|
|
return (x << 16) | (z & 0xFFFF);
|
|
}
|
|
|
|
@Override
|
|
public String toString() {
|
|
return x + "," + z;
|
|
}
|
|
|
|
@Override
|
|
public boolean equals(final Object obj) {
|
|
if (this == obj) {
|
|
return true;
|
|
}
|
|
if ((obj == null) || (this.getClass() != obj.getClass())) {
|
|
return false;
|
|
}
|
|
final IntegerPair other = (IntegerPair) obj;
|
|
return ((this.x == other.x) && (this.z == other.z));
|
|
}
|
|
}
|