Plex-FAWE/worldedit-core/src/main/java/com/boydti/fawe/object/IntegerPair.java
Jesse Boyd a629d15c74
Copy paste/merge FAWE classes to this WorldEdit fork
- so certain people can look at the diff and complain about my sloppy code :(

Signed-off-by: Jesse Boyd <jessepaleg@gmail.com>
2018-08-13 00:03:07 +10:00

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));
}
}