All Packages Class Hierarchy This Package Previous Next Index
Class java.awt.geom.Point2D
java.lang.Object
|
+----java.awt.geom.Point2D
- public abstract class Point2D
- extends Object
A point representing a location in (x, y) coordinate space.
This class is only the abstract superclass for all objects which
store a 2D coordinate.
The actual storage representation of the coordinates is left to
the subclass.
Point2D.Double- A point specified in double precision.
Point2D.Float- A point specified in float precision.
Point2D()
-
equals(Object)
- Determines whether two points are equal.
getX()
- Returns the X coordinate of the point in double precision.
getY()
- Returns the Y coordinate of the point in double precision.
setLocation(double, double)
- Sets the location of this point to the specified float coordinates.
setLocation(Point2D)
- Sets the location of this point to the same coordinates as the
specified Point object.
Point2D
protected Point2D()
getX
public abstract double getX()
- Returns the X coordinate of the point in double precision.
getY
public abstract double getY()
- Returns the Y coordinate of the point in double precision.
setLocation
public abstract void setLocation(double x,
double y)
- Sets the location of this point to the specified float coordinates.
setLocation
public void setLocation(Point2D p)
- Sets the location of this point to the same coordinates as the
specified Point object.
equals
public boolean equals(Object obj)
- Determines whether 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.
- Parameters:
- obj - an object to be compared with this point.
- Returns:
true
if the object to be compared is
an instance of Point2D
and has
the same values; false
otherwise.- Overrides:
- equals in class Object
All Packages Class Hierarchy This Package Previous Next Index
Submit a bug or feature