1 /* 2 * Trip Tracker, a real-time position tracking system for the Internet. 3 * Copyright (C) 2006 Team Trip Tracker 4 * 5 * This program is free software; you can redistribute it and/or modify it 6 * under the terms of the GNU General Public License as published by the 7 * Free Software Foundation; either version 2 of the License, or (at your 8 * option) any later version. 9 * 10 * This program is distributed in the hope that it will be useful, but 11 * WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 * General Public License for more details. 14 * 15 * You should have received a copy of the GNU General Public License along 16 * with this program; if not, write to the Free Software Foundation, Inc., 17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA 18 */ 19 20 package triptracker.core; 21 22 import java.awt.geom.Point2D; 23 24 public abstract class BaseCoord extends Point2D { 25 private final double x; 26 private final double y; 27 28 /*** 29 * Default constructor. 30 */ 31 public BaseCoord() { 32 this(0, 0); 33 } 34 35 public BaseCoord(double x, double y) { 36 this.x = x; 37 this.y = y; 38 } 39 40 @Override 41 public double getX() { 42 return x; 43 } 44 45 @Override 46 public double getY() { 47 return y; 48 } 49 50 @Override 51 public void setLocation(double x, double y) { 52 throw new UnsupportedOperationException(); 53 } 54 55 @Override 56 public void setLocation(Point2D p) { 57 throw new UnsupportedOperationException(); 58 } 59 60 }