|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--IdentifiedWithPosition
This class is as the name says identified, it has an integer as identifier, its common to the robot and the packages classes.
SimpleRobot
,
Package
Field Summary | |
protected int |
id
the integer with wich we're identified :) |
protected int |
x_pos
The x cordinate of the Object |
protected int |
y_pos
The y cordinate of the Object |
Constructor Summary | |
IdentifiedWithPosition()
Default constructor |
|
IdentifiedWithPosition(int ident)
Makes a new Object with the specified id |
|
IdentifiedWithPosition(int ident,
int x,
int y)
Make a new identified object with position (x, y) |
Method Summary | |
int |
id()
Returns the identifier asociated with this object |
void |
setId(int iden)
|
void |
setPos(int x,
int y)
Sets the new position of the Object, (x, y) both |
void |
setX(int x)
Sets the x coordinate of the Object. |
void |
setY(int y)
Sets the y coordinate of the Object. |
int |
x()
get the X position of the Object |
int |
y()
get the Y position of the Object |
Methods inherited from class java.lang.Object |
|
Field Detail |
protected int id
protected int x_pos
protected int y_pos
Constructor Detail |
public IdentifiedWithPosition(int ident, int x, int y)
ident
- the identifier of this objectpublic IdentifiedWithPosition(int ident)
public IdentifiedWithPosition()
Method Detail |
public int id()
id
public void setId(int iden)
public int x()
public int y()
public void setX(int x)
x
- new x positionpublic void setY(int y)
y
- new y positionpublic void setPos(int x, int y)
x
- new x coordinatey
- new y coordinate
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |