|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecttp.mesClasses.Point
public class Point
La classe Point définie des points caractérisés par une abscisse x et une ordonnée
Field Summary | |
---|---|
private int |
x
un point est caractèrisé par son abscisse x et son ordonnée y |
private int |
y
un point est caractèrisé par son abscisse x et son ordonnée y |
Constructor Summary | |
---|---|
Point()
Construit un Point en coordonnées (0,0) |
|
Point(int x,
int y)
Construit un Point de coodonnées (x,y) choisies |
|
Point(Point p)
Construit un point qui est la copie d'un autre |
Method Summary | |
---|---|
void |
deplacer(int x,
int y)
Deplace le point aux nouvelles coordonnées |
boolean |
estEgal(Point p)
Permet la compraison entre le point courant et un autre point |
int |
getX()
Renvoie l'abscisse |
int |
getY()
Renvoie l'ordonnée |
void |
setX(int x)
Permet de modifier l'abscisse |
void |
setY(int y)
Permet de modifier |
java.lang.String |
toString()
|
void |
translater(int dx,
int dy)
Translate le point de dx en abscisse et dy en ordonnée |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private int x
private int y
Constructor Detail |
---|
public Point()
public Point(int x, int y)
x
- l'abscisse choisiey
- l'ordonnée choisiepublic Point(Point p)
p
- l'autre PointMethod Detail |
---|
public void deplacer(int x, int y)
x
- la nouvelle abscissey
- la nouvelle ordonnéepublic boolean estEgal(Point p)
p
- l'autre point
public int getX()
public int getY()
public void setX(int x)
x
- la nouvelle abscissepublic void setY(int y)
y
- public java.lang.String toString()
toString
in class java.lang.Object
public void translater(int dx, int dy)
dx
- la translation en abscissedy
- la translation en ordonnée
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |