|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--com.yospace.yae.yogi.Point
A point representing a location in (x, y) coordinate space, specified in integer precision.
| Field Summary | |
int |
x
The x coordinate. |
int |
y
The y coordinate. |
| Constructor Summary | |
Point()
Constructs a default Point with the location (0,0). |
|
Point(int x,
int y)
Constructs a new Point at the specified coordinates (x,y). |
|
Point(Point p)
Constructs a Point with the same location as the specified Point p. |
|
| Method Summary | |
boolean |
equals(java.lang.Object obj)
Determines whether two points are equal. |
void |
move(int x,
int y)
Move this Point to the specified coordinates. |
static Point |
parsePoint(java.lang.String s)
Parses a String representation of a Point object. |
java.lang.String |
toString()
Returns a string representation of this point and its location in the (x, y) coordinate space. |
void |
translate(int x,
int y)
Translate this Point by the specified values. |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public int x
public int y
| Constructor Detail |
public Point()
public Point(Point p)
p - the Point to initialize the new Point with.
public Point(int x,
int y)
x - the x coordinate.y - the y coordinate.| Method Detail |
public void move(int x,
int y)
x - the new x coordinate.y - the new y coordinate.
public void translate(int x,
int y)
x - the amount to translate the x coordinate of the Point.y - the amount to translate the y coordinate of the Point.public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectobj - the object to compare with.public java.lang.String toString()
toString in class java.lang.Objectpublic static Point parsePoint(java.lang.String s)
s - the String to parse.
|
Copyright 2002 Yospace Holdings Ltd. All Rights Reserved. | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||