org.openstreetmap.josm.data.coor
Class Coordinate

java.lang.Object
  extended by java.awt.geom.Point2D
      extended by org.openstreetmap.josm.data.coor.Coordinate
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable
Direct Known Subclasses:
EastNorth, LatLon

abstract class Coordinate
extends java.awt.geom.Point2D
implements java.io.Serializable

Base class of points of both coordinate systems. The variables are default package protected to allow routines in the data package to access them directly. As the class itself is package protected too, it is not visible outside of the data package. Routines there should only use LatLon or EastNorth.


Nested Class Summary
 
Nested classes/interfaces inherited from class java.awt.geom.Point2D
java.awt.geom.Point2D.Double, java.awt.geom.Point2D.Float
 
Field Summary
protected  double x
           
protected  double y
           
 
Constructor Summary
Coordinate(double x, double y)
          Construct the point with latitude / longitude values.
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 double getX()
           
 double getY()
           
 int hashCode()
           
 void setLocation(double x, double y)
           
 
Methods inherited from class java.awt.geom.Point2D
clone, distance, distance, distance, distanceSq, distanceSq, distanceSq, setLocation
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

x

protected double x

y

protected double y
Constructor Detail

Coordinate

Coordinate(double x,
           double y)
Construct the point with latitude / longitude values.

Parameters:
x - X coordinate of the point.
y - Y coordinate of the point.
Method Detail

getX

public double getX()
Specified by:
getX in class java.awt.geom.Point2D

getY

public double getY()
Specified by:
getY in class java.awt.geom.Point2D

setLocation

public void setLocation(double x,
                        double y)
Specified by:
setLocation in class java.awt.geom.Point2D

hashCode

public int hashCode()
Overrides:
hashCode in class java.awt.geom.Point2D

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.awt.geom.Point2D


JOSM