|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--TreeJuxtaposer.Point
A class representing a point in a plane. Has integer (pixel) (x,y) coordinates stored in (p[0],p[1]).
AccordionDrawer.Tree,
AccordionDrawer.TreeNode| Field Summary | |
private int[] |
p
private data |
| Constructor Summary | |
Point(int x1,
int y1)
Constructor |
|
Point(Point pp)
copy constructor |
|
| Method Summary | |
java.lang.Object |
clone()
to make a copy of the point |
(package private) boolean |
equals(Point pp)
two points are equal if their corresponding coordinates are all equal |
(package private) int |
get(int i)
Get one coordinate from the point object |
(package private) int |
length()
the length of the p array should be 2 |
(package private) void |
set(int i,
int x)
|
java.lang.String |
toString()
output the point as a string |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
private int[] p
| Constructor Detail |
public Point(int x1,
int y1)
x1 - the first coordinatey1 - the second coordinatepublic Point(Point pp)
pp - the pointed to be copied| Method Detail |
int get(int i)
i - The parameter can only be either 0 or 1
void set(int i,
int x)
boolean equals(Point pp)
public java.lang.String toString()
toString in class java.lang.Objectint length()
public java.lang.Object clone()
clone in class java.lang.Object
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||