org.epseelon.mobimap.geom
Class Point2D.Double

java.lang.Object
  extended by org.epseelon.mobimap.geom.Point2D
      extended by org.epseelon.mobimap.geom.Point2D.Double
Enclosing class:
Point2D

public static class Point2D.Double
extends Point2D

This class defines a point in double precision.

Since:
1.2
Author:
Eric Blake (ebb9@email.byu.edu)

Nested Class Summary
 
Nested classes/interfaces inherited from class org.epseelon.mobimap.geom.Point2D
Point2D.Double, Point2D.Float
 
Field Summary
 double x
          The X coordinate.
 double y
          The Y coordinate.
 
Constructor Summary
Point2D.Double()
          Create a new point at (0,0).
Point2D.Double(double x, double y)
          Create a new point at (x,y).
 
Method Summary
 double getX()
          Return the x coordinate.
 double getY()
          Return the y coordinate.
 void setLocation(double x, double y)
          Sets the location of this point.
 java.lang.String toString()
          Returns a string representation of this object.
 
Methods inherited from class org.epseelon.mobimap.geom.Point2D
distance, distance, distance, distanceSq, distanceSq, distanceSq, equals, hashCode, setLocation
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

x

public double x
The X coordinate.


y

public double y
The Y coordinate.

Constructor Detail

Point2D.Double

public Point2D.Double()
Create a new point at (0,0).


Point2D.Double

public Point2D.Double(double x,
                      double y)
Create a new point at (x,y).

Parameters:
x - the x coordinate
y - the y coordinate
Method Detail

getX

public double getX()
Return the x coordinate.

Specified by:
getX in class Point2D
Returns:
the x coordinate

getY

public double getY()
Return the y coordinate.

Specified by:
getY in class Point2D
Returns:
the y coordinate

setLocation

public void setLocation(double x,
                        double y)
Sets the location of this point.

Specified by:
setLocation in class Point2D
Parameters:
x - the new x coordinate
y - the new y coordinate

toString

public java.lang.String toString()
Returns a string representation of this object. The format is: "Point2D.Double[" + x + ", " + y + ']'.

Overrides:
toString in class java.lang.Object
Returns:
a string representation of this object


Copyright © 2008 Epseelon. All Rights Reserved.