Last change
on this file since 1724 was 1169, checked in by stoecker, 15 years ago |
removed usage of tab stops
|
-
Property svn:eol-style
set to
native
|
File size:
1.1 KB
|
Line | |
---|
1 | // License: GPL. Copyright 2007 by Immanuel Scholz and others
|
---|
2 | package org.openstreetmap.josm.data.coor;
|
---|
3 |
|
---|
4 | import java.awt.geom.Point2D;
|
---|
5 | import java.io.Serializable;
|
---|
6 |
|
---|
7 | /**
|
---|
8 | * Base class of points of both coordinate systems.
|
---|
9 | *
|
---|
10 | * The variables are default package protected to allow routines in the
|
---|
11 | * data package to access them directly.
|
---|
12 | *
|
---|
13 | * As the class itself is package protected too, it is not visible
|
---|
14 | * outside of the data package. Routines there should only use LatLon or
|
---|
15 | * EastNorth.
|
---|
16 | *
|
---|
17 | * @author imi
|
---|
18 | */
|
---|
19 | abstract class Coordinate extends Point2D implements Serializable {
|
---|
20 |
|
---|
21 | protected double x;
|
---|
22 | protected double y;
|
---|
23 |
|
---|
24 | /**
|
---|
25 | * Construct the point with latitude / longitude values.
|
---|
26 | *
|
---|
27 | * @param x X coordinate of the point.
|
---|
28 | * @param y Y coordinate of the point.
|
---|
29 | */
|
---|
30 | Coordinate(double x, double y) {
|
---|
31 | this.x = x; this.y = y;
|
---|
32 | }
|
---|
33 |
|
---|
34 | public double getX() {
|
---|
35 | return x;
|
---|
36 | }
|
---|
37 |
|
---|
38 | public double getY() {
|
---|
39 | return y;
|
---|
40 | }
|
---|
41 |
|
---|
42 | public void setLocation (double x, double y) {
|
---|
43 | this.x = x;
|
---|
44 | this.y = y;
|
---|
45 | }
|
---|
46 |
|
---|
47 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.