Class Point
public final class Point
extends Object
-
Constructor Summary
Constructors
Initializes a new instance of the Point class with default coordinates (0, 0).
Point(double x,
double y)
Initializes a new instance of the Point class with the specified coordinates.
-
Method Summary
final double
Returns the x-coordinate of the upper-left corner of this rectangle.
final double
Returns the y-coordinate of the upper-left corner of this rectangle.
final void
Sets the x-coordinate of the upper-left corner of this rectangle.
final void
Sets the y-coordinate of the upper-left corner of this rectangle.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
Point
public Point()
Initializes a new instance of the Point class with default coordinates (0, 0).
-
Point
public Point(double x,
double y)
Initializes a new instance of the Point class with the specified coordinates.
- Parameters:
x
- The X-coordinate of the point.
y
- The Y-coordinate of the point.
-
Method Details
-
getX
public final double getX()
Returns the x-coordinate of the upper-left corner of this rectangle.
-
setX
public final void setX(double value)
Sets the x-coordinate of the upper-left corner of this rectangle.
-
getY
public final double getY()
Returns the y-coordinate of the upper-left corner of this rectangle.
-
setY
public final void setY(double value)
Sets the y-coordinate of the upper-left corner of this rectangle.