|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectPointXY
public class PointXY
Constructor Summary | |
---|---|
PointXY(int xc,
int yc)
Constructs a PointXY at the specified location |
Method Summary | |
---|---|
int |
compareTo(PointXY other)
|
double |
distance2D(PointXY param)
Returns the distance between two points |
boolean |
equals(java.lang.Object o)
|
int |
getX()
returns the x coordinate of this point |
int |
getY()
returns the y coordinate of this point |
static void |
main(java.lang.String[] args)
|
void |
setX(int xValue)
sets the x coordinate to the supplied value |
void |
setXY(int xValue,
int yValue)
sets the x and y coordinates to the supplied values |
void |
setY(int yValue)
sets the y coordinate to the supplied value |
java.lang.String |
toString()
Returns a string representing this point |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public PointXY(int xc, int yc)
Method Detail |
---|
public int getX()
public int getY()
public void setX(int xValue)
xValue
- the new x coordinatepublic void setY(int yValue)
yValue
- the new y coordinatepublic void setXY(int xValue, int yValue)
xValue
- the new x coordinateyValue
- the new y coordinatepublic double distance2D(PointXY param)
public int compareTo(PointXY other)
compareTo
in interface java.lang.Comparable<PointXY>
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public static void main(java.lang.String[] args)
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |