public class Point { public int x; public int y; public Point() { } public Point(int x, int y) { this.x = x; this.y = y; } public boolean equals(Object obj) { if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } final Point other = (Point) obj; if (this.x != other.x) { return false; } return true; } public int hashCode() { int hash = 7; hash = 67 * hash + this.x; hash = 67 * hash + this.y; return hash; } }