/* This file is part of the algoviz@vt collection of algorithm visualizations. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this distribution. If not, see . */ package avl; /** * * * @author Andy Street, alstreet@vt.edu * @version Feb 11, 2009 * */ public class Location { public int x, y; public Location(int x, int y) { this.x = x; this.y = y; } /** * @see java.lang.Object#equals(java.lang.Object) */ @Override public boolean equals(Object o) { if(!(o instanceof Location)) return false; Location other = (Location)o; return other.x == x && other.y == y; } public String toString() { return super.toString() + " => (" + x + ", " + y + ")"; } }