|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectSpaceCraft
Field Summary | |
(package private) int |
heading
|
(package private) java.net.InetAddress |
ID
|
(package private) int |
IDport
|
(package private) int |
xPosition
|
(package private) int |
yPosition
|
Constructor Summary | |
SpaceCraft()
|
Method Summary | |
void |
draw(java.awt.Graphics g)
Default rendering method. |
boolean |
equals(SpaceCraft subject)
Checks to see if this SpaceCraft has the same ID and port number as the input parameter. |
int |
getHeading()
Accessor method for the heading. |
int |
getXPosition()
Accessor method for the xPosition. |
int |
getYPosition()
Accessor method for the yPosition. |
void |
setHeading(int heading)
Mutator method for the heading. |
void |
setX(int x)
Mutator method for the x positon. |
void |
setY(int y)
Mutator method for the y positon. |
java.lang.String |
toString()
Constructs a string representation of the the craft. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
java.net.InetAddress ID
int IDport
int xPosition
int yPosition
int heading
Constructor Detail |
public SpaceCraft()
Method Detail |
public int getHeading()
public boolean equals(SpaceCraft subject)
subject
- SpaceCraft being checked for equality
public int getXPosition()
public int getYPosition()
public void setHeading(int heading)
heading
- parmeter set to 1, 2, 3, or 4public void setX(int x)
x
- new x positionpublic void setY(int y)
y
- new y positionpublic void draw(java.awt.Graphics g)
public java.lang.String toString()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |