|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--Location
class that represents a location in the simulation
Constructor Summary | |
Location()
constructor of Location (0,0) |
|
Location(int ix,
int iy)
copy constructor for Location |
Method Summary | |
int |
getX()
|
int |
getY()
observer for y co-ordinate |
Location |
plus(Direction d)
method enables addition of a direction to a location |
void |
setX(int ix)
mutator for x co-ordinate |
void |
setY(int iy)
mutator for y co-ordinate |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public Location(int ix, int iy)
ix
- is x co-ordinateiy
- is y co-ordinatepublic Location()
Method Detail |
public int getX()
public int getY()
public void setX(int ix)
ix
- is value for x co-ordinatepublic void setY(int iy)
iy
- is value for y co-ordinatepublic Location plus(Direction d)
d
- is direction to be added (has x and y portions)
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |