Home » openjdk-7 » java » awt » geom » [javadoc | source]
java.awt.geom
abstract public class: Point2D [javadoc | source]
java.lang.Object
   java.awt.geom.Point2D

All Implemented Interfaces:
    Cloneable

Direct Known Subclasses:
    Point, Float, Double

The Point2D class defines a point representing a location in {@code (x,y)} coordinate space.

This class is only the abstract superclass for all objects that store a 2D coordinate. The actual storage representation of the coordinates is left to the subclass.

Nested Class Summary:
public static class  Point2D.Float  The Float class defines a point specified in float precision. 
public static class  Point2D.Double  The Double class defines a point specified in double precision. 
Constructor:
 protected Point2D() 
Method from java.awt.geom.Point2D Summary:
clone,   distance,   distance,   distance,   distanceSq,   distanceSq,   distanceSq,   equals,   getX,   getY,   hashCode,   setLocation,   setLocation
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from java.awt.geom.Point2D Detail:
 public Object clone() 
    Creates a new object of the same class and with the same contents as this object.
 public double distance(Point2D pt) 
    Returns the distance from this Point2D to a specified Point2D.
 public double distance(double px,
    double py) 
    Returns the distance from this Point2D to a specified point.
 public static double distance(double x1,
    double y1,
    double x2,
    double y2) 
    Returns the distance between two points.
 public double distanceSq(Point2D pt) 
    Returns the square of the distance from this Point2D to a specified Point2D.
 public double distanceSq(double px,
    double py) 
    Returns the square of the distance from this Point2D to a specified point.
 public static double distanceSq(double x1,
    double y1,
    double x2,
    double y2) 
    Returns the square of the distance between two points.
 public boolean equals(Object obj) 
    Determines whether or not two points are equal. Two instances of Point2D are equal if the values of their x and y member fields, representing their position in the coordinate space, are the same.
 abstract public double getX()
    Returns the X coordinate of this Point2D in double precision.
 abstract public double getY()
    Returns the Y coordinate of this Point2D in double precision.
 public int hashCode() 
    Returns the hashcode for this Point2D.
 public  void setLocation(Point2D p) 
    Sets the location of this Point2D to the same coordinates as the specified Point2D object.
 abstract public  void setLocation(double x,
    double y)
    Sets the location of this Point2D to the specified double coordinates.