Point Members

Point Members

Class Overview | This Package | All Packages

Fields
Name Description
x The x coordinate.
y The y coordinate.

Constructors
Name Description
Point() Constructs and initializes a point at the origin (0, 0) of the coordinate space.
Point(int, int) Constructs and initializes a point at the specified (xy) location in the coordinate space.
Point(Point) Constructs and initializes a point with the same location as the specified Point object.

Methods
Name Description
equals(Object) Determines whether two points are equal.
getLocation() Returns the location of this point.
hashCode() Returns the hashcode for this point.
move(int, int) Moves this point to the specificed location in the (xy) coordinate plane.
setLocation(int, int) Changes the point to have the specificed location.
setLocation(Point) Sets the location of the point to the specificed location.
toString() Returns a representation of this point and its location in the (xy) coordinate space as a string.
translate(int, int) Translates this point, at location (xy), by dx along the x axis and dy along the y axis so that it now represents the point (x + dx, y + dy).