1 import Analysis.SSJava.Location;
4 * Copyright 2009 (c) Florian Frankenberger (darkblue.de)
6 * This file is part of LEA.
8 * LEA is free software: you can redistribute it and/or modify it under the
9 * terms of the GNU Lesser General Public License as published by the Free
10 * Software Foundation, either version 3 of the License, or (at your option) any
13 * LEA is distributed in the hope that it will be useful, but WITHOUT ANY
14 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
15 * A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
18 * You should have received a copy of the GNU Lesser General Public License
19 * along with LEA. If not, see <http://www.gnu.org/licenses/>.
23 * Representing an eyes deviation
25 * @author Florian Frankenberger
27 public class Deviation {
29 int directionX, directionY;
32 public Deviation(String direction, int directionX, int directionY) {
33 this.directionX = directionX;
34 this.directionY = directionY;
35 this.direction = direction;
38 public boolean concurs(int directionX, int directionY) {
39 return (directionX == this.directionX && directionY == this.directionY);
42 public boolean equals(Object o) {
43 if (!(o instanceof Deviation)) {
47 Deviation dev = (Deviation) o;
48 if (dev.directionX == directionX && dev.directionY == directionY) {