Methods Summary |
---|
public final boolean | equals(int x, int y)Returns true if the point's coordinates equal (x,y)
return this.x == x && this.y == y;
|
public boolean | equals(java.lang.Object o)
if (o instanceof Point) {
Point p = (Point) o;
return this.x == p.x && this.y == p.y;
}
return false;
|
public int | hashCode()
return x * 32713 + y;
|
public final void | negate()Negate the point's coordinates
x = -x;
y = -y;
|
public final void | offset(int dx, int dy)Offset the point's coordinates by dx, dy
x += dx;
y += dy;
|
public void | set(int x, int y)Set the point's x and y coordinates
this.x = x;
this.y = y;
|
public java.lang.String | toString()
return "Point(" + x + ", " + y+ ")";
|